-
Notifications
You must be signed in to change notification settings - Fork 435
Add highlighting (on search / filter) to DataTable #328
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
Conversation
@donnieberg @ivanbogdanov @minevskiy Would be interested in your thoughts on this. It's not a feature that is explicitly defined on the lightning design website but it is used throughout the core app and has been requested in designs. I made it completely optional and even though it has a third-party dependency that dependency is only included if you're actually using this optional feature. |
I really like this feature! I see it in a lot of our designs as well, and in general, it's very useful. The link to the herokuapp is broken..would you be able to repost? |
Looks great. SFX Dashboards have a similar highlighting in Lookup item labels (also using |
@donnieberg The Heroku review app must have expired. I'm pushing an extra test now so that should kick it back on. @minevskiy I'm not planning to add it to the index.js so that it can remain optional. Doesn't mean we couldn't add it in there in the future if it turned out to be a heavily used feature. |
LGTM! :) |
Requires
react-highlighter
, but is an optional addition to the library so a default build will not include the third-party library and projects which don't need the feature won't include it either.Updates the design of
Cell
slightly to make higher-order components easier to create. Uses the new pattern to create aHighlightCell
.Allows DataTable props to cascade from table to column to cell.
Adds a
Card
story to use as an example use-case for highlighting. (Note that the story converts any filter input into a RegEx, while app developers should most likely use a more advanced "fuzzy," multi-column search, or even search on the server.)Fixes #251