1
0
Fork 0
mirror of synced 2024-07-09 08:16:34 +12:00

Merge pull request #11857 from Budibase/budi-6922-the-number-0-cannot-be-displayed-on-input-number-fields-when

The number 0 cannot be displayed on input number fields
This commit is contained in:
Andrew Kingston 2023-09-26 10:31:58 +01:00 committed by GitHub
commit c08d9e1243
3 changed files with 4 additions and 9 deletions

View file

@ -96,8 +96,8 @@
{disabled}
{readonly}
{id}
value={value || ""}
placeholder={placeholder || ""}
value={value ?? ""}
placeholder={placeholder ?? ""}
on:click
on:blur
on:focus

View file

@ -45,7 +45,7 @@
on:focus={() => (active = true)}
on:blur={() => (active = false)}
{type}
value={value || ""}
value={value ?? ""}
on:change={handleChange}
spellcheck="false"
/>

View file

@ -305,12 +305,7 @@ export class ExternalRequest {
manyRelationships: ManyRelationship[] = []
for (let [key, field] of Object.entries(table.schema)) {
// if set already, or not set just skip it
if (row[key] == null || newRow[key] || !isEditableColumn(field)) {
continue
}
// if its an empty string then it means return the column to null (if possible)
if (row[key] === "") {
newRow[key] = null
if (row[key] === undefined || newRow[key] || !isEditableColumn(field)) {
continue
}
// parse floats/numbers