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

EUIHighlight highlights only first found word #2911

Closed
sumukhah opened this issue Feb 24, 2020 · 4 comments · Fixed by #2957
Closed

EUIHighlight highlights only first found word #2911

sumukhah opened this issue Feb 24, 2020 · 4 comments · Fixed by #2957

Comments

@sumukhah
Copy link

In a given text it only checks and highlights the first word it found,
It completely neglects rest.
highlight

@anishagg17
Copy link
Contributor

I think it is the desired behaviour

@chandlerprall
Copy link
Contributor

As EuiHighlight has been around for a while and is used in many places, this change (as a de facto default) would likely be unwelcome. That said, I think it is useful functionality (personally, I'm always tripped up when this component does not highlight all matching terms) and it should be built behind an additional flag/prop. This will need an accompanying docs example section and description.

@chandlerprall
Copy link
Contributor

@sumukhah this is a valid feature request, and the functionality would be welcome in EUI. My comment was only to say the default operation of the component shouldn't change (i.e. highlight only the first occurrence), and that the new functionality should be enabled through a new prop that can be passed to the component, e.g. highlightAll={true}

@ashikmeerankutty
Copy link
Contributor

I'm working on this

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

Successfully merging a pull request may close this issue.

4 participants