ktmud commented on a change in pull request #12319:
URL: https://github.com/apache/superset/pull/12319#discussion_r553570949
##########
File path: superset-frontend/src/explore/components/DatasourcePanel.tsx
##########
@@ -154,13 +155,10 @@ const DataSourcePanel = ({
setList({ columns, metrics });
return;
}
- const filteredColumns = lists.columns.filter(
- column => column.column_name.indexOf(value) !== -1,
- );
- const filteredMetrics = lists.metrics.filter(
- metric => metric.metric_name.indexOf(value) !== -1,
- );
- setList({ columns: filteredColumns, metrics: filteredMetrics });
+ setList({
+ columns: matchSorter(columns, value, { keys: ['column_name'] }),
+ metrics: matchSorter(metrics, value, { keys: ['metric_name'] }),
Review comment:
Would we want to search by SQL expression and data type as well?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]