From 9fba1fa7e5ce37a620d18bbad688e750d98a9ff3 Mon Sep 17 00:00:00 2001 From: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Date: Fri, 22 Nov 2024 05:34:37 +1100 Subject: [PATCH] [8.x] fix: [Search:Search Applications:Content page]Missing error text for Select searchable indices field (#200736) (#201241) # Backport This will backport the following commits from `main` to `8.x`: - [fix: [Search:Search Applications:Content page]Missing error text for Select searchable indices field (#200736)](https://github.com/elastic/kibana/pull/200736) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) Co-authored-by: Alexey Antonov --- .../search_application/add_indices_flyout.tsx | 17 +++++++---------- .../components/indices_select_combobox.tsx | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_flyout.tsx b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_flyout.tsx index 0a0c7af7ed028..2f483d757505f 100644 --- a/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_flyout.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/applications/components/search_application/add_indices_flyout.tsx @@ -19,7 +19,6 @@ import { EuiFlyoutBody, EuiFlyoutFooter, EuiFlyoutHeader, - EuiFormRow, EuiSpacer, EuiTitle, } from '@elastic/eui'; @@ -90,25 +89,22 @@ export const AddIndicesFlyout: React.FC = ({ onClose }) = )} - - - + /> = ({ onClose }) = & { 'data-telemetry-id'?: string; ignoredOptions?: string[]; + label?: string; }; export const IndicesSelectComboBox = ({ ignoredOptions, ...props }: IndicesSelectComboBoxProps) => { const [searchQuery, setSearchQuery] = useState(undefined); const { makeRequest } = useActions(FetchIndicesForSearchApplicationsAPILogic); const { status, data } = useValues(FetchIndicesForSearchApplicationsAPILogic); + const isInvalid = Boolean(searchQuery && !props.selectedOptions?.length); useEffect(() => { makeRequest({ searchQuery }); @@ -85,7 +88,20 @@ export const IndicesSelectComboBox = ({ ignoredOptions, ...props }: IndicesSelec renderOption, ...props, }; - return ; + + return ( + + + + ); }; export const indexToOption = (