Skip to content

Commit

Permalink
Fix deprecated API calls introduced by pr-117627 (elastic#119058)
Browse files Browse the repository at this point in the history
  • Loading branch information
machadoum authored Nov 19, 2021
1 parent 634d306 commit 8ba5812
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof useKibana>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -34,7 +34,7 @@ const StyledButton = styled(EuiButton)`

export const CreateFieldButton = React.memo<CreateFieldButtonProps>(
({ selectedDataViewId, onClick: onClickParam, timelineId }) => {
const [dataView, setDataView] = useState<IndexPattern | null>(null);
const [dataView, setDataView] = useState<DataView | null>(null);
const dispatch = useDispatch();

const { indexFieldsSearch } = useDataView();
Expand All @@ -53,7 +53,7 @@ export const CreateFieldButton = React.memo<CreateFieldButtonProps>(
if (dataView) {
indexPatternFieldEditor?.openEditor({
ctx: { indexPattern: dataView },
onSave: (field: IndexPatternField) => {
onSave: (field: DataViewField) => {
// Fetch the updated list of fields
indexFieldsSearch(selectedDataViewId);

Expand Down

0 comments on commit 8ba5812

Please sign in to comment.