react-bootstrap-typeahead icon indicating copy to clipboard operation
react-bootstrap-typeahead copied to clipboard

Highlighting the search keyword only at start instead of middle of the select list

Open architdutt opened this issue 3 years ago • 1 comments

For example : image

As in the above example I don't want the a's that are highlighted(bold) in yellow or else no bold letters itself.

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like A clear and concise description of what you want to happen.

How is this solution useful to others? Does your feature address a common use case? Does it provide a more generalized way to solve the type of problem you're encountering?

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context, sample code, or screenshots about the feature request here.

architdutt avatar Aug 02 '22 11:08 architdutt

Hi @architdutt, and thanks for the feature request! The highlighting you refer to happens within the Highlighter component included in this library. That component currently doesn't provide a way to limit the substring match to the beginning of the string, but it should be pretty easy to create your own component. Once you've done that, you can use renderMenu or renderMenuItemChildren to render the menu items using your component.

ericgio avatar Aug 06 '22 15:08 ericgio

No plans to implement this feature; API already provides the flexibility to do your own highlighting/matching.

ericgio avatar Mar 06 '23 06:03 ericgio