mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* allow saving blank string to panel title
This commit is contained in:
parent
e4cd33d9d2
commit
d748f64044
1 changed files with 1 additions and 4 deletions
|
@ -29,9 +29,6 @@ export function convertPanelStateToSavedDashboardPanel(
|
|||
panelState: DashboardPanelState,
|
||||
version: string
|
||||
): SavedDashboardPanel {
|
||||
const customTitle: string | undefined = panelState.explicitInput.title
|
||||
? (panelState.explicitInput.title as string)
|
||||
: undefined;
|
||||
const savedObjectId = (panelState.explicitInput as SavedObjectEmbeddableInput).savedObjectId;
|
||||
return {
|
||||
version,
|
||||
|
@ -39,7 +36,7 @@ export function convertPanelStateToSavedDashboardPanel(
|
|||
gridData: panelState.gridData,
|
||||
panelIndex: panelState.explicitInput.id,
|
||||
embeddableConfig: omit(panelState.explicitInput, ['id', 'savedObjectId', 'title']),
|
||||
...(customTitle && { title: customTitle }),
|
||||
...(panelState.explicitInput.title !== undefined && { title: panelState.explicitInput.title }),
|
||||
...(savedObjectId !== undefined && { id: savedObjectId }),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue