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

ComboBox filter reset behavior (clearFilterOnOptionToggle) #2294

Merged
merged 18 commits into from
Oct 23, 2024

Conversation

r100-stack
Copy link
Member

@r100-stack r100-stack commented Oct 9, 2024

Changes

Adds on to the patch fix in #2295 to completely address #2276.

Added a new clearFilterOnOptionToggle prop (name bikesheddable) only when multiple is true. Possible values:

  • true (default): Filter is cleared when an option is toggled. Useful when users would likely want to re-filter after toggling an option.
  • false: Filter is not cleared when an option is toggled. This is useful when users would likely want to toggle multiple options from the same filtered results.

Since the default value is true, which is the existing behavior before this PR, there is no change in the default behavior (no breaking change).

This prop allows the user to choose the behavior since as we see in #2276, both behaviors have benefits.

Testing

  • Edited existing story (could create a separate one if needed).
  • Added docs. Didn't add an example since that didn't feel necessary and would unnecessarily take up space imo.
  • Added e2e tests to test clearFilterOnOptionToggle.

Docs

Added minor changeset.

@r100-stack r100-stack self-assigned this Oct 9, 2024
@r100-stack r100-stack changed the base branch from main to r/combobox-fix-input-value-not-reset October 10, 2024 15:20
@r100-stack r100-stack marked this pull request as ready for review October 10, 2024 15:54
@r100-stack r100-stack requested a review from a team as a code owner October 10, 2024 15:54
@r100-stack r100-stack requested review from mayank99 and smmr-dn and removed request for a team October 10, 2024 15:54
@r100-stack r100-stack changed the title Filter ComboBox input value reset behavior ComboBox filter reset behavior (clearFilterOnOptionToggle) Oct 10, 2024
Base automatically changed from r/combobox-fix-input-value-not-reset to main October 10, 2024 17:53
Copy link
Contributor

@smmr-dn smmr-dn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't have any further comments on this PR at the moment so I'm approving this. I will take a look back when you make changes later.

@r100-stack r100-stack merged commit 8a6b1c6 into main Oct 23, 2024
18 checks passed
@r100-stack r100-stack deleted the r/combobox-multiple-filter-behavior branch October 23, 2024 19:22
@imodeljs-admin imodeljs-admin mentioned this pull request Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants