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 <FilterLiveSearch> should react to filter values change #9996

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

slax57
Copy link
Contributor

@slax57 slax57 commented Jul 12, 2024

Problem

If you have both a <FilterLiveSearch> and a <FilterButton>, clicking on 'Remove all filters' in the <FilterButton> doesn't clear the <FilterLiveSearch> text input (although the filters are indeed cleared).

Similarily, updating the filter value for the field targeted by <FilterLiveSearch source> doesn't update the <FilterLiveSearch> text input (although the filter is applied).

Solution

Use values instead of defaultValues when declaring the form for <FilterLiveSearch>, which makes it reactive.

How To Test

  • 2 unit tests are added
  • 1 story is added (WithFilterButton)

Additional Checks

  • The PR targets master for a bugfix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@slax57 slax57 added the RFR Ready For Review label Jul 12, 2024
@adguernier adguernier self-requested a review July 12, 2024 13:16
@adguernier adguernier added this to the 5.0.5 milestone Jul 12, 2024
@adguernier adguernier merged commit 1cff10b into master Jul 12, 2024
14 checks passed
@adguernier adguernier deleted the fix-FilterLiveSearch-clear-all-filters branch July 12, 2024 13:21
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.

3 participants