-
Notifications
You must be signed in to change notification settings - Fork 161
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
igxTextHighlight - searching has side effect on unmatched cell. #1493
Comments
@tkiryu Both of these things aren't bugs with the search. The search simply replaces the cell content with text and span elements. So it isn't a good idea to define styles inline, as the node itself will be replaced with new content. Instead you can simply use the cellClasses input of the column to define a custom class for the cells and use this class for your styling. I modified the stackblitz to demonstrate this. As for the dummy column, any column for which the search feature makes no sense can be excluded using its searchable input. Simply set it to false and the undefined text will no longer appear. Note that this input is not present in 6.0.0 and will be included in the next release. |
@DDavidkov , thank you for your comment. I get your point. As for the latter, for sure, But, as for the former, I have different thoughts. Let me explain later on. |
There is a common scenario that changing cell style according to its value or row data or something(Please refer to #1079). In order to achieve that, At least, only the cells that matches search text should be replaced with new content. Unmatched cells should have no side effect. |
@tkiryu Support for the search to not change the structure and attributes of arbitrary markup will be a very difficult task that will have limited use. Also, while not affecting unmatched cells will help a bit, it won't really solve anything, as the problem will still appear in the matched cells, so I am not willing to introduce changes in the code for no reason. |
Steps to reproduce
Result
There are two problems.
igxCell
template style is cleared.undefined
is displayed on dummy cell.Expected result
1, 2. Nothing should happen to the cell that the search word doesn't match.
The text was updated successfully, but these errors were encountered: