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

Closed
wooly opened this issue Feb 23, 2024 · 4 comments · Fixed by #7425
Closed

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

wooly opened this issue Feb 23, 2024 · 4 comments · Fixed by #7425
Assignees
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. has PR Issues that has been fixed with a PR.

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
@wenzhixin wenzhixin self-assigned this Jul 22, 2024
@wenzhixin wenzhixin added the has PR Issues that has been fixed with a PR. label Jul 26, 2024
@wenzhixin
Copy link
Owner

@chaskett
Copy link

Looks great! Thanks @wenzhixin

@wooly
Copy link
Author

wooly commented Jul 26, 2024

Indeed thanks @wenzhixin!

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. has PR Issues that has been fixed with a PR.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants