Skip to content

Commit

Permalink
EuiComboBox prevent form submission (#2642)
Browse files Browse the repository at this point in the history
* preventDefault

* CL
  • Loading branch information
thompsongl authored Dec 12, 2019
1 parent ee5af7e commit a05b1e7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

- Improved `EuiDataGrid` update performance ([#2638](https://github.com/elastic/eui/pull/2638))
- Fixed `EuiDroppable` not accepting multiple children when using TypeScript ([#2634](https://github.com/elastic/eui/pull/2634))
- Fixed `EuiComboBox` from submitting parent `form` element when selecting options via `Enter` key ([#2642](https://github.com/elastic/eui/pull/2642))

## [`17.1.2`](https://github.com/elastic/eui/tree/v17.1.2)

Expand Down
1 change: 1 addition & 0 deletions src/components/combo_box/combo_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ export class EuiComboBox extends Component {
break;

case comboBoxKeyCodes.ENTER:
e.preventDefault();
e.stopPropagation();
if (this.hasActiveOption()) {
this.onAddOption(
Expand Down

0 comments on commit a05b1e7

Please sign in to comment.