mirror of
https://github.com/apache/superset.git
synced 2024-09-12 08:39:45 -04:00
fix(dashboard-list): change name of dashboard is not reflected instantly (#15186)
* fix: change name of dashboard is not reflected instantly * fix: id * fix: update info * fix: add changed_on_delta_humanized
This commit is contained in:
parent
2be52c0659
commit
1d572ca92b
@ -157,8 +157,26 @@ function DashboardList(props: DashboardListProps) {
|
|||||||
({ json = {} }) => {
|
({ json = {} }) => {
|
||||||
setDashboards(
|
setDashboards(
|
||||||
dashboards.map(dashboard => {
|
dashboards.map(dashboard => {
|
||||||
if (dashboard.id === json.id) {
|
if (dashboard.id === json?.result?.id) {
|
||||||
return json.result;
|
const {
|
||||||
|
changed_by_name,
|
||||||
|
changed_by_url,
|
||||||
|
changed_by,
|
||||||
|
dashboard_title = '',
|
||||||
|
slug = '',
|
||||||
|
json_metadata = '',
|
||||||
|
changed_on_delta_humanized,
|
||||||
|
} = json.result;
|
||||||
|
return {
|
||||||
|
...dashboard,
|
||||||
|
changed_by_name,
|
||||||
|
changed_by_url,
|
||||||
|
changed_by,
|
||||||
|
dashboard_title,
|
||||||
|
slug,
|
||||||
|
json_metadata,
|
||||||
|
changed_on_delta_humanized,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return dashboard;
|
return dashboard;
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user