Skip to content

Commit

Permalink
[EuiCombobox] Add autocomplete="off" (#7842)
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll authored Jun 20, 2024
1 parent 02113bc commit a7f6d84
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
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

0 comments on commit a7f6d84

Please sign in to comment.