File tree Expand file tree Collapse file tree
src/plugins/dashboard/public/application/top_nav Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { useKibana } from '../../services/kibana_react';
2727import { IndexPattern , SavedQuery , TimefilterContract } from '../../services/data' ;
2828import {
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 (
You can’t perform that action at this time.
0 commit comments