Skip to content

Commit

Permalink
fix: [Stateful: Indices: Overview page] Missing focus on New button a…
Browse files Browse the repository at this point in the history
…fter closing or cancelling Generate API key dialog

Closes: elastic#196174
  • Loading branch information
alexwizp committed Oct 18, 2024
1 parent 592225d commit feb7bee
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 && (
<GenerateApiKeyModal indexName={indexName} onClose={closeGenerateModal} />
)}
<EuiFlexGroup>
<EuiFlexItem>
<EuiPanel hasBorder paddingSize="xl">
Expand Down

0 comments on commit feb7bee

Please sign in to comment.