mirror of https://github.com/apache/superset.git
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 = {} }) => {
|
||||
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;
|
||||
}),
|
||||
|
|
Loading…
Reference in New Issue