diff --git a/CHANGELOG.md b/CHANGELOG.md index ef7963857e3..4e4d5db75d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - Replaced `react-focus-lock` with `react-focus-on` ([#3631](https://github.com/elastic/eui/pull/3631)) - Fixed errors in `EuiSuperDatePicker` related to invalid and `null` date formatting ([#3750](https://github.com/elastic/eui/pull/3750)) - Fixed type definitions for `findTestSubject` and `takeMountedSnapshot` ([#3763](https://github.com/elastic/eui/pull/3763)) +- Fixed `EuiComboBox` not allowing clicks on previously virtualized items when inside of `EuiFormRow` ([#3784](https://github.com/elastic/eui/pull/3784)) +- Removed `[Space]` as a way to select options in `EuiSelectable` ([#3784](https://github.com/elastic/eui/pull/3784)) ## [`27.1.0`](https://github.com/elastic/eui/tree/v27.1.0) diff --git a/src/components/form/form_row/form_row.tsx b/src/components/form/form_row/form_row.tsx index 5c48878d602..25c9ca03ba3 100644 --- a/src/components/form/form_row/form_row.tsx +++ b/src/components/form/form_row/form_row.tsx @@ -139,8 +139,14 @@ export class EuiFormRow extends Component { onChildFocus(...args); } - this.setState({ - isFocused: true, + this.setState(({ isFocused }) => { + if (!isFocused) { + return { + isFocused: true, + }; + } else { + return null; + } }); }; diff --git a/src/components/selectable/selectable.tsx b/src/components/selectable/selectable.tsx index e0e5c55d335..863c32b2e4e 100644 --- a/src/components/selectable/selectable.tsx +++ b/src/components/selectable/selectable.tsx @@ -231,7 +231,6 @@ export class EuiSelectable extends Component< break; case keys.ENTER: - case keys.SPACE: event.preventDefault(); event.stopPropagation(); if (this.state.activeOptionIndex != null && optionsList) { diff --git a/src/components/selectable/selectable_list/selectable_list_item.tsx b/src/components/selectable/selectable_list/selectable_list_item.tsx index c0bc01d0086..811d9d86356 100644 --- a/src/components/selectable/selectable_list/selectable_list_item.tsx +++ b/src/components/selectable/selectable_list/selectable_list_item.tsx @@ -135,7 +135,7 @@ export class EuiSelectableListItem extends Component< @@ -156,7 +156,7 @@ export class EuiSelectableListItem extends Component<