Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.17] fix: [Search:AppSearch:Engines:Schema page]Add a new field modal dialog missing title from announcement (#201786) #201995

Merged
merged 1 commit into from
Nov 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
EuiModalHeader,
EuiModalHeaderTitle,
EuiSpacer,
useGeneratedHtmlId,
} from '@elastic/eui';

import { SchemaFieldTypeSelect } from '..';
Expand Down Expand Up @@ -78,10 +79,12 @@ export const SchemaAddFieldModal: React.FC<Props> = ({
? FIELD_NAME_CORRECTED_NOTE(formattedFieldName)
: FIELD_NAME_CORRECT_NOTE;

const modalTitleId = useGeneratedHtmlId();

return (
<EuiModal onClose={closeAddFieldModal} maxWidth={500}>
<EuiModal onClose={closeAddFieldModal} maxWidth={500} aria-labelledby={modalTitleId}>
<EuiModalHeader>
<EuiModalHeaderTitle>{ADD_FIELD_MODAL_TITLE}</EuiModalHeaderTitle>
<EuiModalHeaderTitle id={modalTitleId}>{ADD_FIELD_MODAL_TITLE}</EuiModalHeaderTitle>
</EuiModalHeader>
<EuiModalBody>
<EuiCallOut
Expand Down Expand Up @@ -130,7 +133,12 @@ export const SchemaAddFieldModal: React.FC<Props> = ({
</EuiForm>
</EuiModalBody>
<EuiModalFooter>
<EuiButtonEmpty onClick={closeAddFieldModal}>{CANCEL_BUTTON_LABEL}</EuiButtonEmpty>
<EuiButtonEmpty
data-test-subj="enterpriseSearchSchemaAddFieldModalButton"
onClick={closeAddFieldModal}
>
{CANCEL_BUTTON_LABEL}
</EuiButtonEmpty>
<EuiButton
fill
type="submit"
Expand Down