diff --git a/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx b/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx index 4fb2b9419c377..d373710c29444 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.test.tsx @@ -15,7 +15,7 @@ import { import { TestProviders } from '../../../common/mock'; import { useKibana } from '../../../common/lib/kibana'; -import { DataView } from '../../../../../../../src/plugins/data/common'; +import type { DataView } from '../../../../../../../src/plugins/data/common'; import { TimelineId } from '../../../../common'; const useKibanaMock = useKibana as jest.Mocked; diff --git a/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.tsx b/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.tsx index 33d8587eca818..801513f188e32 100644 --- a/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.tsx +++ b/x-pack/plugins/security_solution/public/timelines/components/create_field_button/index.tsx @@ -10,7 +10,7 @@ import { EuiButton } from '@elastic/eui'; import styled from 'styled-components'; import { useDispatch } from 'react-redux'; -import { IndexPattern, IndexPatternField } from '../../../../../../../src/plugins/data/public'; +import { DataView, DataViewField } from '../../../../../../../src/plugins/data/common'; import { useKibana } from '../../../common/lib/kibana'; import * as i18n from './translations'; @@ -34,7 +34,7 @@ const StyledButton = styled(EuiButton)` export const CreateFieldButton = React.memo( ({ selectedDataViewId, onClick: onClickParam, timelineId }) => { - const [dataView, setDataView] = useState(null); + const [dataView, setDataView] = useState(null); const dispatch = useDispatch(); const { indexFieldsSearch } = useDataView(); @@ -53,7 +53,7 @@ export const CreateFieldButton = React.memo( if (dataView) { indexPatternFieldEditor?.openEditor({ ctx: { indexPattern: dataView }, - onSave: (field: IndexPatternField) => { + onSave: (field: DataViewField) => { // Fetch the updated list of fields indexFieldsSearch(selectedDataViewId);