Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fields data inside an array can't be set to empty when a default is set. #4456

Closed
4 tasks done
abdalla-rko opened this issue Jan 21, 2025 · 0 comments · Fixed by #4461
Closed
4 tasks done

Fields data inside an array can't be set to empty when a default is set. #4456

abdalla-rko opened this issue Jan 21, 2025 · 0 comments · Fixed by #4461
Assignees
Labels

Comments

@abdalla-rko
Copy link
Contributor

Prerequisites

What theme are you using?

core

Version

5.24.1

Current Behavior

Field data inside an array can't be set to empty when a default value is set and mergeDefaultsIntoFormData is set to 'useFormDataIfPresent'. This issue only occurs when the field is directly an item of the array field. In any other cases field data can be set to an empty value.

Expected Behavior

Fields data inside an array can be set to empty when a default is set.

Steps To Reproduce

  1. Click here to open the demo
  2. Try to clear the arrayWithDefaults-1 field and you'll notice that it's not possible.
  3. Try to clear nestedField or stringField and you'll notice that it is working properly.

Environment

- OS:macos
- Node:
- npm:

Anything else?

No response

@abdalla-rko abdalla-rko added bug needs triage Initial label given, to be assigned correct labels and assigned labels Jan 21, 2025
@nickgros nickgros removed the needs triage Initial label given, to be assigned correct labels and assigned label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants