You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose globalFilter match Ranges to use with CSS.Highlight()
#6647
I'm looking at adding CSS.Highlight() highlights for search matches in my table. To do this, you need to get all the Ranges for all the matches. I'm currently able to do this by walking the table after render and finding matches. This has several drawbacks-
It doesn't exactly match the table's global filtering options (case sensitivity, trimming, etc)
It finds matches in columns that aren't actively filtered on
It would be useful to have a way to retrieve ranges directly from the table instance to match how the table is filtering.
I'm also looping through data multiple times- first for the table filter, then for the highlights. I believe that the filtering logic intentionally returns after a single match, which likely shouldn't change. This means that a second loop through for the ranges is probably still needed.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
I'm looking at adding
CSS.Highlight()highlights for search matches in my table. To do this, you need to get all the Ranges for all the matches. I'm currently able to do this by walking the table after render and finding matches. This has several drawbacks-It would be useful to have a way to retrieve ranges directly from the table instance to match how the table is filtering.
I'm also looping through data multiple times- first for the table filter, then for the highlights. I believe that the filtering logic intentionally returns after a single match, which likely shouldn't change. This means that a second loop through for the ranges is probably still needed.
All reactions