From feb7bee617f5587ef33d3c2ba5795527f77d75df Mon Sep 17 00:00:00 2001 From: Alexey Antonov Date: Fri, 18 Oct 2024 17:59:00 +0300 Subject: [PATCH] fix: [Stateful: Indices: Overview page] Missing focus on New button after closing or cancelling Generate API key dialog Closes: #196174 --- .../search_index/generate_api_key_panel.tsx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx index f1470f37bc8f0..52da11d51c074 100644 --- a/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx +++ b/x-pack/plugins/enterprise_search/public/applications/enterprise_search_content/components/search_index/generate_api_key_panel.tsx @@ -7,27 +7,20 @@ import React from 'react'; -import { useActions, useValues } from 'kea'; +import { useValues } from 'kea'; import { EuiEmptyPrompt, EuiFlexGroup, EuiFlexItem, EuiPanel } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { GenerateApiKeyModal } from './components/generate_api_key_modal/modal'; - import { APIGettingStarted } from './components/getting_started/getting_started'; import { IndexViewLogic } from './index_view_logic'; -import { OverviewLogic } from './overview.logic'; export const GenerateApiKeyPanel: React.FC = () => { - const { isGenerateModalOpen } = useValues(OverviewLogic); - const { indexName, isHiddenIndex } = useValues(IndexViewLogic); - const { closeGenerateModal } = useActions(OverviewLogic); + const { isHiddenIndex } = useValues(IndexViewLogic); + return ( <> - {isGenerateModalOpen && ( - - )}