Skip to content

Commit

Permalink
[EuiSuggest] Accept isPreFiltered prop (#5930)
Browse files Browse the repository at this point in the history
* Accept isPreFiltered prop. Passing it directly to EuiSelectable

* Documentation fix: Grammar

* CL

Co-authored-by: Greg Thompson <thompson.glowe@gmail.com>
  • Loading branch information
omar-zahid and thompsongl authored Sep 6, 2022
1 parent 193e742 commit 1fbcae8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/suggest/suggest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ type _EuiSuggestProps = CommonProps &
* Default is `60vh`
*/
maxHeight?: CSSProperties['maxHeight'];

/**
* Control whether or not options get filtered internally or if consumer will filter.
* Default `false`
*/
isPreFiltered?: boolean;
};

export type EuiSuggestProps = _EuiSuggestProps &
Expand Down Expand Up @@ -138,6 +144,7 @@ export const EuiSuggest: FunctionComponent<EuiSuggestProps> = ({
id,
'aria-label': ariaLabel,
'aria-labelledby': labelId,
isPreFiltered = false,
isVirtualized = false,
fullWidth = true,
maxHeight = '60vh',
Expand Down Expand Up @@ -297,6 +304,7 @@ export const EuiSuggest: FunctionComponent<EuiSuggestProps> = ({
isVirtualized,
}}
searchable
isPreFiltered={isPreFiltered}
searchProps={{
id,
append: appendArray.length ? appendArray : undefined,
Expand Down
2 changes: 2 additions & 0 deletions upcoming_changelogs/5930.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Updated `EuiSuggest` to accept the `isPreFiltered` prop

0 comments on commit 1fbcae8

Please sign in to comment.