mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix: Error when searching for a dashboard in the chart list (#24546)
This commit is contained in:
parent
2dfb50b83a
commit
2b1275d8c4
@ -270,8 +270,8 @@ function ChartList(props: ChartListProps) {
|
|||||||
? {
|
? {
|
||||||
filters: [
|
filters: [
|
||||||
{
|
{
|
||||||
col: 'dashboards',
|
col: 'dashboard_title',
|
||||||
opr: FilterOperator.relationManyMany,
|
opr: FilterOperator.startsWith,
|
||||||
value: filterValue,
|
value: filterValue,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@ -287,9 +287,7 @@ function ChartList(props: ChartListProps) {
|
|||||||
...filters,
|
...filters,
|
||||||
});
|
});
|
||||||
const response: void | JsonResponse = await SupersetClient.get({
|
const response: void | JsonResponse = await SupersetClient.get({
|
||||||
endpoint: !filterValue
|
endpoint: `/api/v1/dashboard/?q=${queryParams}`,
|
||||||
? `/api/v1/dashboard/?q=${queryParams}`
|
|
||||||
: `/api/v1/chart/?q=${queryParams}`,
|
|
||||||
}).catch(() =>
|
}).catch(() =>
|
||||||
addDangerToast(t('An error occurred while fetching dashboards')),
|
addDangerToast(t('An error occurred while fetching dashboards')),
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user