@@ -13,9 +13,8 @@ import { BehaviorSubject, merge } from 'rxjs';
1313import { css } from '@emotion/react' ;
1414import { EuiComboBox } from '@elastic/eui' ;
1515import { apiPublishesESQLVariables , type ESQLControlState } from '@kbn/esql-types' ;
16- import { useBatchedPublishingSubjects , apiHasParentApi } from '@kbn/presentation-publishing' ;
16+ import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing' ;
1717import { initializeUnsavedChanges } from '@kbn/presentation-containers' ;
18- import { tracksOverlays } from '@kbn/presentation-util' ;
1918import { ESQL_CONTROL } from '../../../common' ;
2019import type { ESQLControlApi } from './types' ;
2120import { ControlFactory } from '../types' ;
@@ -43,19 +42,13 @@ export const getESQLControlFactory = (): ControlFactory<ESQLControlState, ESQLCo
4342 controlGroupApi . controlFetch$ ( uuid )
4443 ) ;
4544
46- const closeOverlay = ( ) => {
47- if ( apiHasParentApi ( controlGroupApi ) && tracksOverlays ( controlGroupApi . parentApi ) ) {
48- controlGroupApi . parentApi . clearOverlays ( ) ;
49- }
50- } ;
5145 const onSaveControl = ( updatedState : ESQLControlState ) => {
5246 controlGroupApi ?. replacePanel ( uuid , {
5347 panelType : 'esqlControl' ,
5448 serializedState : {
5549 rawState : updatedState ,
5650 } ,
5751 } ) ;
58- closeOverlay ( ) ;
5952 } ;
6053
6154 function serializeState ( ) {
@@ -107,7 +100,6 @@ export const getESQLControlFactory = (): ControlFactory<ESQLControlState, ESQLCo
107100 controlType : initialState . controlType ,
108101 esqlVariables : variablesInParent ,
109102 onSaveControl,
110- onCancelControl : closeOverlay ,
111103 initialState : state ,
112104 } ) ;
113105 } catch ( e ) {
0 commit comments