Skip to content

Cannot clear field with default value #2306

@lmestel

Description

@lmestel

Describe the bug

If there is a default value in the schema and ajv is configured with useDefaults: true, there is no way to clear the input field to set the value to an empty string.
After the last character has been deleted, the input field is immediately filled with the default value again.

Expected behavior

The input field can be cleared to get an empty string in the data.

Steps to reproduce the issue

  1. Go to https://codepen.io/lmestel/pen/QWPMMjR
  2. Try to clear the input fields
  3. After the last character has been deleted, the input field is immediately filled again with the default value

Screenshots

No response

Which Version of JSON Forms are you using?

3.2.1

Framework

No response

RendererSet

No response

Additional context

#1983
#1984

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions