From 6b80588ddad9bd6f775c7fff184f21652feb9151 Mon Sep 17 00:00:00 2001 From: cchaos Date: Tue, 11 Sep 2018 13:01:13 -0400 Subject: [PATCH 1/2] Combobox fixes - pass `onClick` and `onClickAriaLabel` properly - Fix plain text vertical alignment in IE --- .../combo_box_input/_combo_box_pill.scss | 1 + .../combo_box_input/combo_box_pill.js | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/components/combo_box/combo_box_input/_combo_box_pill.scss b/src/components/combo_box/combo_box_input/_combo_box_pill.scss index d90b1a8ce81..44eb7acf1ae 100644 --- a/src/components/combo_box/combo_box_input/_combo_box_pill.scss +++ b/src/components/combo_box/combo_box_input/_combo_box_pill.scss @@ -5,6 +5,7 @@ line-height: $euiSizeL - 2px; &--plainText { + line-height: $euiSizeL; font-size: $euiFontSizeS; font-family: $euiFontFamily; padding: 0 $euiSizeXS; diff --git a/src/components/combo_box/combo_box_input/combo_box_pill.js b/src/components/combo_box/combo_box_input/combo_box_pill.js index 84e92a3f408..0b61b078bcd 100644 --- a/src/components/combo_box/combo_box_input/combo_box_pill.js +++ b/src/components/combo_box/combo_box_input/combo_box_pill.js @@ -12,6 +12,8 @@ export class EuiComboBoxPill extends Component { color: PropTypes.string, onClose: PropTypes.func, asPlainText: PropTypes.bool, + onClick: PropTypes.func, + onClickAriaLabel: PropTypes.string, }; static defaultProps = { @@ -30,6 +32,8 @@ export class EuiComboBoxPill extends Component { option, // eslint-disable-line no-unused-vars onClose, // eslint-disable-line no-unused-vars color, + onClick, + onClickAriaLabel, asPlainText, ...rest } = this.props; @@ -54,6 +58,8 @@ export class EuiComboBoxPill extends Component { closeButtonProps={{ tabIndex: '-1', }} + onClick={onClick} + onClickAriaLabel={onClickAriaLabel} {...rest} > {children} @@ -62,11 +68,22 @@ export class EuiComboBoxPill extends Component { } if (asPlainText) { - return {children}; + return ( + + {children} + + ); } return ( - + {children} ); From f1c950e1ea0a5376913d36ea688c9ca998ec008e Mon Sep 17 00:00:00 2001 From: cchaos Date: Tue, 11 Sep 2018 13:04:15 -0400 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index af406eae3ec..0e940202d8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,10 @@ - Added `euiFacetButton` and `euiFacetGroup` ([#1167](https://github.com/elastic/eui/pull/1167)) - Added `width` prop to `EuiContextMenu` panels ([#1173](https://github.com/elastic/eui/pull/1173)) +**Bug fixes** + +- Fixed `onClickAriaLabel` console error stemming from `EuiComboBoxPill` ([#1183](https://github.com/elastic/eui/pull/1183)) + ## [`3.10.0`](https://github.com/elastic/eui/tree/v3.10.0) - Added `maxWidth` prop to `EuiModal` ([#1165](https://github.com/elastic/eui/pull/1165))