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

[EuiSelectable+EuiComboBox] recent regresion fixes #3784

Merged
merged 4 commits into from
Jul 22, 2020
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 CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 8 additions & 2 deletions src/components/form/form_row/form_row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,14 @@ export class EuiFormRow extends Component<EuiFormRowProps, EuiFormRowState> {
onChildFocus(...args);
}

this.setState({
isFocused: true,
this.setState(({ isFocused }) => {
if (!isFocused) {
return {
isFocused: true,
};
} else {
return null;
}
});
};

Expand Down
1 change: 0 additions & 1 deletion src/components/selectable/selectable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ export class EuiSelectableListItem extends Component<
<span>
<EuiI18n
token="euiSelectableListItem.includedOptionInstructions"
default="To exclude this option, press enter or space."
default="To exclude this option, press enter."
/>
</span>
</EuiScreenReaderOnly>
Expand All @@ -156,7 +156,7 @@ export class EuiSelectableListItem extends Component<
<span>
<EuiI18n
token="euiSelectableListItem.excludedOptionInstructions"
default="To deselect this option, press enter or space."
default="To deselect this option, press enter."
/>
</span>
</EuiScreenReaderOnly>
Expand Down