Skip to content

Commit

Permalink
refactor(frontend): make "Search" box the first filter for charts and…
Browse files Browse the repository at this point in the history
… datasets (apache#25129)
  • Loading branch information
sfirke authored Aug 30, 2023
1 parent 1b35085 commit 8b7f443
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions superset-frontend/src/pages/ChartList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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]);

Expand Down
14 changes: 7 additions & 7 deletions superset-frontend/src/pages/DatasetList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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],
);
Expand Down

0 comments on commit 8b7f443

Please sign in to comment.