mirror of
https://github.com/apache/superset.git
synced 2026-05-06 16:34:32 +00: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:
@@ -157,8 +157,26 @@ function DashboardList(props: DashboardListProps) {
|
||||
({ json = {} }) => {
|
||||
setDashboards(
|
||||
dashboards.map(dashboard => {
|
||||
if (dashboard.id === json.id) {
|
||||
return json.result;
|
||||
if (dashboard.id === json?.result?.id) {
|
||||
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;
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user