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

feat: add keepFilter option #7063

Merged
merged 7 commits into from
Jan 11, 2024
Merged

feat: add keepFilter option #7063

merged 7 commits into from
Jan 11, 2024

Conversation

sissbruecker
Copy link
Contributor

@sissbruecker sissbruecker commented Jan 10, 2024

Adds a keepFilter option to <vaadin-multi-select-combo-box> that allows to keep the filter value after selecting an item.

Some notes regarding the behavior:

  • Filter is preserved when selecting items using either mouse or keyboard
  • Input value is restored to the filter after selecting items using keyboard. Selecting items using keyboard overrides the input value with the item label so this needs to be reverted.
  • The filter is cleared when:
    • Closing the overlay either due to focus out or canceling input with Escape
    • Adding a custom value
    • Trying to commit a non-existing value. Might be better UX to keep the filter, but I left it out due to complexity, and it seems like an edge-case.

Closes #5930

@sissbruecker sissbruecker marked this pull request as ready for review January 11, 2024 11:40
Copy link
Member

@web-padawan web-padawan left a comment

Choose a reason for hiding this comment

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

Tested manually and the feature works as expected 👍

The only problem I found is related to clear button on mobile but that's not related to this PR as the issue can be reproduced on main branch too. Created #7066 for it.

Copy link

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@sissbruecker sissbruecker merged commit d731b62 into main Jan 11, 2024
9 checks passed
@sissbruecker sissbruecker deleted the feat/mscb-keep-filter branch January 11, 2024 13:37
sissbruecker added a commit that referenced this pull request Jan 15, 2024
sissbruecker added a commit that referenced this pull request Jan 15, 2024
@vaadin-bot
Copy link
Collaborator

This ticket/PR has been released with Vaadin 24.4.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow multiselection at once for Multiselect Combobox
3 participants