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

Fix override of defaultValue in FormInput #4482

Merged
merged 1 commit into from
Mar 6, 2020

Conversation

JulienMattiussi
Copy link
Contributor

@JulienMattiussi JulienMattiussi commented Mar 6, 2020

Issue

Issue introduced by the persistency of the empty filters that was implemented.

defaultValue of a FormInput can be set by mistake if this situation :

  • Add a displayed filter containing a defaultValue in your list
  • Clean it's value (but don't remove the filter)
  • Navigate elsewere
  • Come back in the initial list
    => The defaultValue has been set again, and the filter is "un-removable"

Solution

Ignore defaultValue in Field because it is always set at Form level

Notes

final-form/react-final-form#387

@JulienMattiussi JulienMattiussi added WIP Work In Progress RFR Ready For Review and removed WIP Work In Progress labels Mar 6, 2020
@fzaninotto fzaninotto added this to the 3.3.0 milestone Mar 6, 2020
@fzaninotto fzaninotto merged commit 5e2a0dd into master Mar 6, 2020
@fzaninotto fzaninotto deleted the fix-surcharge-of-defaultValue branch March 6, 2020 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFR Ready For Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants