Skip to content

Commit

Permalink
[EuiSuggest] Prevents popover to open when empty array is passed into…
Browse files Browse the repository at this point in the history
… suggestions (#4349)

* Prevented popover to open when empty array is passed into suggestions prop

* Adding CL

* Update src/components/suggest/suggest_input.tsx

Co-authored-by: Caroline Horn <[email protected]>

* Update CHANGELOG.md

Co-authored-by: Caroline Horn <[email protected]>

Co-authored-by: Caroline Horn <[email protected]>
  • Loading branch information
elizabetdev and cchaos authored Dec 9, 2020
1 parent 8a91ba8 commit 8aeded9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `30.6.0`.
**Bug fixes**

- Fixed `EuiSuggest` popover opening when an empty array is passed into the `suggestions` prop ([#4349](https://github.com/elastic/eui/pull/4349))

## [`30.6.0`](https://github.com/elastic/eui/tree/v30.6.0)

Expand Down
2 changes: 1 addition & 1 deletion src/components/suggest/suggest_input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ export const EuiSuggestInput: FunctionComponent<EuiSuggestInputProps> = (
<EuiInputPopover
className={classes}
input={customInput}
isOpen={isPopoverOpen}
isOpen={suggestions.length > 0 && isPopoverOpen}
panelPaddingSize="none"
fullWidth
closePopover={closePopover}>
Expand Down

0 comments on commit 8aeded9

Please sign in to comment.