Dashboards: Fix crashing dashboards after save (#102048)
This commit is contained in:
@@ -67,8 +67,10 @@ export function DashboardEditPaneSplitter({ dashboard, isEditing, body, controls
|
||||
containerStyle.overflow = 'unset';
|
||||
}
|
||||
|
||||
const onBodyRef = (ref: HTMLDivElement) => {
|
||||
dashboard.onSetScrollRef(new DivScrollElement(ref));
|
||||
const onBodyRef = (ref: HTMLDivElement | null) => {
|
||||
if (ref) {
|
||||
dashboard.onSetScrollRef(new DivScrollElement(ref));
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -70,7 +70,7 @@ export class K8sDashboardAPI implements DashboardAPI<DashboardDTO, Dashboard> {
|
||||
getDashboardUrl({
|
||||
uid: v.metadata.name,
|
||||
currentQueryParams: '',
|
||||
slug: kbn.slugifyForUrl(v.spec.title),
|
||||
slug: kbn.slugifyForUrl(v.spec.title.trim()),
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ export class K8sDashboardV2API
|
||||
getDashboardUrl({
|
||||
uid: v.metadata.name,
|
||||
currentQueryParams: '',
|
||||
slug: kbn.slugifyForUrl(v.spec.title),
|
||||
slug: kbn.slugifyForUrl(v.spec.title.trim()),
|
||||
})
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user