1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-07-22 23:18:02 +00:00

Form bugfixes

This commit is contained in:
2023-01-29 20:16:31 +01:00
parent 99108121c3
commit dc5b12ee0d
6 changed files with 13 additions and 14 deletions

View File

@ -8,7 +8,7 @@
export let valid = false;
const validity = {};
$: valid = Object.values(validity).every(v => !!v);
$: valid = Object.values(validity).every(v => v !== false);
const iconMap = {
string: 'text',
@ -49,7 +49,7 @@
</div>
<div class="input">
<FormInput {column} bind:value={keypathProxy[column.key]} bind:valid={validity[column.key]} />
<button type="button" class="btn" title="Reset value" on:click={() => reset(column.key)} disabled={!keypathProxy[column.key]}>
<button type="button" class="btn" title="Reset value" on:click={() => reset(column.key)} disabled={keypathProxy[column.key] === undefined}>
<Icon name="reload" />
</button>
</div>
@ -89,6 +89,7 @@
font-size: 10px;
padding: 3px 5px;
font-weight: 600;
line-height: 1;
}
.tag.invalid {
background-color: rgba(255, 80, 80, 0.3);

View File

@ -35,7 +35,7 @@
database: collection.dbKey,
collection: collection.key,
type: 'table',
columns: [ { key: '_id', showInTable: true, inputType: 'string' } ],
columns: [ { key: '_id', showInTable: true, inputType: 'objectid', mandatory: true } ],
};
activeViewKey = newViewKey;
}