diff --git a/src/components/suggest/suggest.tsx b/src/components/suggest/suggest.tsx index 492338a6c04..f3122b379aa 100644 --- a/src/components/suggest/suggest.tsx +++ b/src/components/suggest/suggest.tsx @@ -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 & @@ -138,6 +144,7 @@ export const EuiSuggest: FunctionComponent = ({ id, 'aria-label': ariaLabel, 'aria-labelledby': labelId, + isPreFiltered = false, isVirtualized = false, fullWidth = true, maxHeight = '60vh', @@ -297,6 +304,7 @@ export const EuiSuggest: FunctionComponent = ({ isVirtualized, }} searchable + isPreFiltered={isPreFiltered} searchProps={{ id, append: appendArray.length ? appendArray : undefined, diff --git a/upcoming_changelogs/5930.md b/upcoming_changelogs/5930.md new file mode 100644 index 00000000000..713ee1fd072 --- /dev/null +++ b/upcoming_changelogs/5930.md @@ -0,0 +1,2 @@ +- Updated `EuiSuggest` to accept the `isPreFiltered` prop +