Reputation: 41
I have a usecase where I am using a search bar to filter some texts in react native. If the word searched is present in any of the texts then the word is highlighted and some words left an right to it are shown eg text : Hi my name is aaron searched: : name
how it should look on UI : ... my name is ...
basically some part left and right to searched string will be shown and the searched part will be highlighted. Also need to fit this in one line, hence ellipses need to be there on both ends. I need help in how this can be achieved.
Upvotes: 2
Views: 76