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

Search highlight not working when cell contains multiple HTML elements with text #7194

Open
wooly opened this issue Feb 23, 2024 · 1 comment
Labels
Bug Issues which are marked as Bug confirmed Issues that have been confirmed with a reduced test case and identify a bug. core Issues stemming from our compiled or source JavaScript files.

Comments

@wooly
Copy link

wooly commented Feb 23, 2024

Bootstraptable version(s) affected

1.22.2

Description

We have a use case where we render multiple pieces of text into a table cell inside separate html elements - imagine two span elements containing different pieces of text.

When searching, the results are filtered correctly but the search highlight isn't working.

I've attached an example whereby the search highlight is initially working (search for item and see everything get highlighted). However, when the breakTheThings variable is changed to true and run again, you'll see that the column now has an additional span containing the word 'Fish'. This breaks the search highlight when you search for 'item' as before, and nothing is highlighted.

Any assistance would be much appreciated!

Cheers.

Example(s)

https://live.bootstrap-table.com/code/wooly/17184

Possible Solutions

No response

Additional Context

No response

@wooly wooly added the Bug Issues which are marked as Bug label Feb 23, 2024
@chaskett
Copy link

I can confirm.

@wenzhixin wenzhixin added confirmed Issues that have been confirmed with a reduced test case and identify a bug. core Issues stemming from our compiled or source JavaScript files. labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Issues which are marked as Bug confirmed Issues that have been confirmed with a reduced test case and identify a bug. core Issues stemming from our compiled or source JavaScript files.
Projects
None yet
Development

No branches or pull requests

3 participants