Skip to content

Commit cf9dbf0

Browse files
authored
Fixed duplication of create new modal (#86489) (#86535)
1 parent 104ea1e commit cf9dbf0

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

src/plugins/dashboard/public/application/top_nav/dashboard_top_nav.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { useKibana } from '../../services/kibana_react';
2727
import { IndexPattern, SavedQuery, TimefilterContract } from '../../services/data';
2828
import {
2929
EmbeddableFactoryNotFoundError,
30+
EmbeddableInput,
3031
isErrorEmbeddable,
3132
openAddPanelFlyout,
3233
ViewMode,
@@ -135,10 +136,7 @@ export function DashboardTopNav({
135136
if (!factory) {
136137
throw new EmbeddableFactoryNotFoundError(type);
137138
}
138-
const explicitInput = await factory.getExplicitInput();
139-
if (dashboardContainer) {
140-
await dashboardContainer.addNewEmbeddable(type, explicitInput);
141-
}
139+
await factory.create({} as EmbeddableInput, dashboardContainer);
142140
}, [dashboardContainer, embeddable]);
143141

144142
const onChangeViewMode = useCallback(

0 commit comments

Comments
 (0)