mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Fix deprecated API calls introduced by pr-117627 (#119058)
This commit is contained in:
parent
634d306acb
commit
8ba5812b52
2 changed files with 4 additions and 4 deletions
|
@ -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>;
|
||||
|
|
|
@ -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<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();
|
||||
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue