From f8916f4e54c2c1b91fa33ca0edffdd56ac21a6df Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Sat, 22 Jun 2024 09:21:43 -0500 Subject: [PATCH] fix sourcerer --- .../experimental/components/dataview_picker/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/x-pack/plugins/security_solution/public/sourcerer/experimental/components/dataview_picker/index.tsx b/x-pack/plugins/security_solution/public/sourcerer/experimental/components/dataview_picker/index.tsx index 47223daee7c99..59bfcc9ec98eb 100644 --- a/x-pack/plugins/security_solution/public/sourcerer/experimental/components/dataview_picker/index.tsx +++ b/x-pack/plugins/security_solution/public/sourcerer/experimental/components/dataview_picker/index.tsx @@ -38,8 +38,8 @@ export const DataViewPicker = memo(() => { const { dataViewId } = useSelector(sourcererAdapterSelector); - const createNewDataView = useCallback(() => { - closeDataViewEditor.current = dataViewEditor.openEditor({ + const createNewDataView = useCallback(async () => { + closeDataViewEditor.current = await dataViewEditor.openEditor({ // eslint-disable-next-line no-console onSave: () => console.log('new data view saved'), allowAdHocDataView: true, @@ -58,7 +58,7 @@ export const DataViewPicker = memo(() => { } const dataViewInstance = await data.dataViews.get(dataViewId); - closeFieldEditor.current = dataViewFieldEditor.openEditor({ + closeFieldEditor.current = await dataViewFieldEditor.openEditor({ ctx: { dataView: dataViewInstance, },