refactor(frontend): make "Search" box the first filter for charts and datasets (#25129)

This commit is contained in:
Sam Firke 2023-08-30 17:34:03 -04:00 committed by GitHub
parent 66e2807009
commit eeecd59c9d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 14 deletions

View File

@ -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]);

View File

@ -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],
);