This is an automated email from the ASF dual-hosted git repository. michaelsmolina pushed a commit to branch 3.0 in repository https://gitbox.apache.org/repos/asf/superset.git
commit 46e6d3226045dd62d444f4279b2d47a28adf0469 Author: Sam Firke <[email protected]> AuthorDate: Wed Aug 30 17:34:03 2023 -0400 refactor(frontend): make "Search" box the first filter for charts and datasets (#25129) (cherry picked from commit eeecd59c9d8156f2883ace2a8aa8c833a483fefe) --- superset-frontend/src/pages/ChartList/index.tsx | 14 +++++++------- superset-frontend/src/pages/DatasetList/index.tsx | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/superset-frontend/src/pages/ChartList/index.tsx b/superset-frontend/src/pages/ChartList/index.tsx index e94dc426b1..e47f479811 100644 --- a/superset-frontend/src/pages/ChartList/index.tsx +++ b/superset-frontend/src/pages/ChartList/index.tsx @@ -589,6 +589,13 @@ function ChartList(props: ChartListProps) { const filters: Filters = useMemo(() => { const filters_list = [ + { + Header: t('Search'), + key: 'search', + id: 'slice_name', + input: 'search', + operator: FilterOperator.chartAllText, + }, { Header: t('Owner'), key: 'owner', @@ -705,13 +712,6 @@ function ChartList(props: ChartListProps) { fetchSelects: loadTags, }); } - filters_list.push({ - Header: t('Search'), - key: 'search', - id: 'slice_name', - input: 'search', - operator: FilterOperator.chartAllText, - }); return filters_list; }, [addDangerToast, favoritesFilter, props.user]); diff --git a/superset-frontend/src/pages/DatasetList/index.tsx b/superset-frontend/src/pages/DatasetList/index.tsx index 0f3fb84ab1..76d96757c0 100644 --- a/superset-frontend/src/pages/DatasetList/index.tsx +++ b/superset-frontend/src/pages/DatasetList/index.tsx @@ -521,6 +521,13 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({ const filterTypes: Filters = useMemo( () => [ + { + Header: t('Search'), + key: 'search', + id: 'table_name', + input: 'search', + operator: FilterOperator.contains, + }, { Header: t('Owner'), key: 'owner', @@ -598,13 +605,6 @@ const DatasetList: FunctionComponent<DatasetListProps> = ({ { label: t('No'), value: false }, ], }, - { - Header: t('Search'), - key: 'search', - id: 'table_name', - input: 'search', - operator: FilterOperator.contains, - }, ], [user], );
