Skip to content

Default value on number field is not registered on save #5212

Description

@AshleighMab

Describe the bug
Default values on number fields are not being registered as valid values on save.

This happens in two ways depending on whether the field is required:

  • If the number field IS required: The form cannot be saved. It displays "This field is required," even though the number field shows a pre-filled default value.

https://jam.dev/c/2db5f2d7-37ee-4975-8aa1-21e218ab2073

  • If the number field IS NOT required: The form saves successfully, but the default value is not persisted - it is saved as null instead of the intended default.

https://jam.dev/c/aed9a197-1940-454c-b609-9ec84bb598cc

To Reproduce

  1. Go to details form that has a number field with a default value.
  2. Click the Edit button.
  3. Without manually entering a value, and the default value of 500 showing click Save.
  4. See error (if number field required) or observe null saved instead of the default (if number field not required).

Expected behavior
The number field's default value should be registered as a valid value.

Additional context
Need for v43

Metadata

Metadata

Assignees

Labels

SRItem logged from a Shesha SR

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions