-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Error when searching for a dashboard in the chart list #24546
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -270,8 +270,8 @@ function ChartList(props: ChartListProps) { | |
? { | ||
filters: [ | ||
{ | ||
col: 'dashboards', | ||
opr: FilterOperator.relationManyMany, | ||
col: 'dashboard_title', | ||
opr: FilterOperator.startsWith, | ||
value: filterValue, | ||
}, | ||
], | ||
|
@@ -287,9 +287,7 @@ function ChartList(props: ChartListProps) { | |
...filters, | ||
}); | ||
const response: void | JsonResponse = await SupersetClient.get({ | ||
endpoint: !filterValue | ||
? `/api/v1/dashboard/?q=${queryParams}` | ||
: `/api/v1/chart/?q=${queryParams}`, | ||
endpoint: `/api/v1/dashboard/?q=${queryParams}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @michael-s-molina I briefly looked into this logic previously. Could you confirm that your logic also works when you include a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you use the search input (not the dashboard select) to look for a dashboard name, it won't work. That would require creating a search filter but that's out of the scope of this PR. |
||
}).catch(() => | ||
addDangerToast(t('An error occurred while fetching dashboards')), | ||
); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's using
startsWith
which is the same operator used by the Datasets filter.