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

[EuiCombobox] Add autocomplete="off" #7842

Merged
merged 4 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions packages/eui/changelogs/upcoming/7842.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Updated `EuiComboBox` to no longer autocomplete searched text when used within forms

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ exports[`EuiComboBox renders 1`] = `
aria-expanded="false"
aria-invalid="false"
aria-label="aria-label"
autocomplete="off"
class="euiComboBox__input"
data-test-subj="comboBoxSearchInput"
id="generated-id__eui-combobox-id"
Expand Down Expand Up @@ -82,6 +83,7 @@ exports[`EuiComboBox renders the options list dropdown 1`] = `
aria-controls="generated-id_listbox"
aria-expanded="true"
aria-invalid="false"
autocomplete="off"
class="euiComboBox__input"
data-test-subj="comboBoxSearchInput"
id="generated-id__eui-combobox-id"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ export class EuiComboBoxInput<T> extends Component<
placeholder={showPlaceholder ? placeholder : undefined}
value={this.searchValue}
autoFocus={autoFocus}
autoComplete="off"
// Force the menu to re-open on every input click - only necessary when plain text
onClick={this.asPlainText ? (onFocus as any) : undefined} // Type shenanigans - event should be mostly the same
/>
Expand Down
Loading