Skip to content

Commit 87adb36

Browse files
committed
remove trackOverlays that now is handled internally
1 parent 359eb79 commit 87adb36

1 file changed

Lines changed: 1 addition & 9 deletions

File tree

src/platform/plugins/shared/controls/public/controls/esql_control/get_esql_control_factory.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ import { BehaviorSubject, merge } from 'rxjs';
1313
import { css } from '@emotion/react';
1414
import { EuiComboBox } from '@elastic/eui';
1515
import { apiPublishesESQLVariables, type ESQLControlState } from '@kbn/esql-types';
16-
import { useBatchedPublishingSubjects, apiHasParentApi } from '@kbn/presentation-publishing';
16+
import { useBatchedPublishingSubjects } from '@kbn/presentation-publishing';
1717
import { initializeUnsavedChanges } from '@kbn/presentation-containers';
18-
import { tracksOverlays } from '@kbn/presentation-util';
1918
import { ESQL_CONTROL } from '../../../common';
2019
import type { ESQLControlApi } from './types';
2120
import { 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

Comments
 (0)