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 search attribute and its values #931

Open
sudheer-gowrigari opened this issue Nov 4, 2023 · 3 comments
Open

Combobox search attribute and its values #931

sudheer-gowrigari opened this issue Nov 4, 2023 · 3 comments
Labels

Comments

@sudheer-gowrigari
Copy link
Collaborator

This issue aims to gather feedback on the naming and functionality of the search attribute on combobox element and its associated values (pattern, startswith, includes).

Copy link

github-actions bot commented May 6, 2024

There hasn't been any discussion on this issue for a while, so we're marking it as stale. If you choose to kick off the discussion again, we'll remove the 'stale' label.

@github-actions github-actions bot added the stale label May 6, 2024
@TheOneTheOnlyJJ
Copy link

A feature that should be considered is highlighting the matching text pattern, like illustrated with Material UI:

https://mui.com/material-ui/react-autocomplete/#highlights

The easiest way to achieve this would be through rendering a <strong> element around the matching text pattern.

This would eliminate the need for a 3rd party dependency (or just additional JS code) in many cases, as highlighting the matching pattern is a commonly desired functionality, especially in the case of includes. Having this implemented at the platform level in browsers would surely boost performance considerably.

@github-actions github-actions bot removed the stale label Aug 7, 2024
@moniuch
Copy link

moniuch commented Jan 11, 2025

Issue marked as stale but let me add my comment

  • includes is probably the most typical scenario for searching, but it is also most typical for it to be case insensitive. Not sure if includes would imply sensitiveness (as String.prototype.includes does). Maybe there should be a way to explicitly provide the sensitivity flag?

  • startswith is perhaps less common, at least seems counter-intuitive from user PoV - but the same case sensitiveness comment would apply anyway

  • pattern would be the easiest way to provide the case sensitivity flag, however in practice, the pattern would have to be reassigned with every keystroke - feels a bit of a costly operation for a quick keystroke succession. Feel free to correct me if I'm wrong.

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

No branches or pull requests

4 participants