mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
refactor(frontend): make "Search" box the first filter for charts and datasets (#25129)
This commit is contained in:
parent
66e2807009
commit
eeecd59c9d
@ -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]);
|
||||
|
||||
|
@ -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],
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user