diff --git a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/configuration_form/source_field_section/source_field_section.tsx b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/configuration_form/source_field_section/source_field_section.tsx index d1b0ee3a3e83e..f79741d9a1a9f 100644 --- a/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/configuration_form/source_field_section/source_field_section.tsx +++ b/x-pack/legacy/plugins/index_management/public/app/components/mappings_editor/components/configuration_form/source_field_section/source_field_section.tsx @@ -3,7 +3,7 @@ * or more contributor license agreements. Licensed under the Elastic License; * you may not use this file except in compliance with the Elastic License. */ -import React, { useState } from 'react'; +import React from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n/react'; @@ -14,9 +14,6 @@ import { UseField, FormDataProvider, FormRow, ToggleField } from '../../../share import { ComboBoxOption } from '../../../types'; export const SourceFieldSection = () => { - const [includeComboBoxOptions, setIncludeComboBoxOptions] = useState([]); - const [excludeComboBoxOptions, setExcludeComboBoxOptions] = useState([]); - const renderWarning = () => ( { {({ label, helpText, value, setValue }) => ( { setValue(newValue); @@ -90,7 +87,6 @@ export const SourceFieldSection = () => { }; setValue([...(value as ComboBoxOption[]), newOption]); - setIncludeComboBoxOptions([...includeComboBoxOptions, newOption]); }} fullWidth /> @@ -104,13 +100,13 @@ export const SourceFieldSection = () => { {({ label, helpText, value, setValue }) => ( { setValue(newValue); @@ -121,7 +117,6 @@ export const SourceFieldSection = () => { }; setValue([...(value as ComboBoxOption[]), newOption]); - setExcludeComboBoxOptions([...excludeComboBoxOptions, newOption]); }} fullWidth />