-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
fix: update search in datasource panel to use matchSorter #12319
Conversation
Codecov Report
@@ Coverage Diff @@
## master #12319 +/- ##
==========================================
- Coverage 67.14% 63.00% -4.15%
==========================================
Files 1002 1002
Lines 49300 49283 -17
Branches 5010 5010
==========================================
- Hits 33104 31050 -2054
- Misses 16071 18031 +1960
- Partials 125 202 +77
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
setList({ columns: filteredColumns, metrics: filteredMetrics }); | ||
setList({ | ||
columns: matchSorter(columns, value, { keys: ['column_name'] }), | ||
metrics: matchSorter(metrics, value, { keys: ['metric_name'] }), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would we want to search by SQL expression and data type as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you mean searching metrics and columns properties, which users can't really see?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. But I think they do have a way to see both. For metric definition, there is an info icon tooltip, for data type there is an icon (maybe not that useful than the metric definition, though).
SUMMARY
Datasource search was case sensitive and did not re-search on character delete. This pr adds matchSorter for search of metrics and columns characters while do all character checking.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Screen.Recording.2021-01-06.at.5.21.50.PM.mov
TEST PLAN
ADDITIONAL INFORMATION