From 3dc275849a1c9341b602da7c5112d234f8a610d8 Mon Sep 17 00:00:00 2001 From: Titani Date: Fri, 9 Feb 2024 13:51:27 -0500 Subject: [PATCH 1/3] bug(Select): expose height and max height props for Menu contnet --- packages/react-core/src/components/Select/Select.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/react-core/src/components/Select/Select.tsx b/packages/react-core/src/components/Select/Select.tsx index 92df78cf996..42d3525ecd4 100644 --- a/packages/react-core/src/components/Select/Select.tsx +++ b/packages/react-core/src/components/Select/Select.tsx @@ -70,6 +70,10 @@ export interface SelectProps extends MenuProps, OUIAProps { role?: string; /** Additional properties to pass to the popper */ popperProps?: SelectPopperProps; + /** Height of the menu */ + menuHeight?: string; + /** Maximum height of menu */ + maxMenuHeight?: string; } const SelectBase: React.FunctionComponent = ({ @@ -87,6 +91,8 @@ const SelectBase: React.FunctionComponent = ({ zIndex = 9999, role = 'listbox', popperProps, + menuHeight, + maxMenuHeight, ...props }: SelectProps & OUIAProps) => { const localMenuRef = React.useRef(); @@ -158,7 +164,9 @@ const SelectBase: React.FunctionComponent = ({ )} {...props} > - {children} + + {children} + ); return ( From 5a100dd17ca810c3db3ff9571ce58a0b15fa0101 Mon Sep 17 00:00:00 2001 From: Titani Date: Tue, 13 Feb 2024 16:14:38 -0500 Subject: [PATCH 2/3] add isScrollable prop --- packages/react-core/src/components/Select/Select.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/react-core/src/components/Select/Select.tsx b/packages/react-core/src/components/Select/Select.tsx index 42d3525ecd4..c3939a27b5e 100644 --- a/packages/react-core/src/components/Select/Select.tsx +++ b/packages/react-core/src/components/Select/Select.tsx @@ -70,10 +70,12 @@ export interface SelectProps extends MenuProps, OUIAProps { role?: string; /** Additional properties to pass to the popper */ popperProps?: SelectPopperProps; - /** Height of the menu */ + /** Height of the select menu */ menuHeight?: string; - /** Maximum height of menu */ + /** Maximum height of select menu */ maxMenuHeight?: string; + /** Indicates if the select menu should be srollable */ + isScrollable?: boolean; } const SelectBase: React.FunctionComponent = ({ @@ -93,6 +95,7 @@ const SelectBase: React.FunctionComponent = ({ popperProps, menuHeight, maxMenuHeight, + isScrollable, ...props }: SelectProps & OUIAProps) => { const localMenuRef = React.useRef(); @@ -157,6 +160,7 @@ const SelectBase: React.FunctionComponent = ({ }} isPlain={isPlain} selected={selected} + isScrollable={isScrollable} {...getOUIAProps( Select.displayName, props.ouiaId !== undefined ? props.ouiaId : getDefaultOUIAId(Select.displayName), From 82855c72a8508725db0996c34d1fd17e84d95e11 Mon Sep 17 00:00:00 2001 From: Titani Labaj <39532947+tlabaj@users.noreply.github.com> Date: Tue, 13 Feb 2024 16:30:34 -0500 Subject: [PATCH 3/3] Update packages/react-core/src/components/Select/Select.tsx Co-authored-by: Eric Olkowski <70952936+thatblindgeye@users.noreply.github.com> --- packages/react-core/src/components/Select/Select.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-core/src/components/Select/Select.tsx b/packages/react-core/src/components/Select/Select.tsx index c3939a27b5e..e5bf254ca4d 100644 --- a/packages/react-core/src/components/Select/Select.tsx +++ b/packages/react-core/src/components/Select/Select.tsx @@ -74,7 +74,7 @@ export interface SelectProps extends MenuProps, OUIAProps { menuHeight?: string; /** Maximum height of select menu */ maxMenuHeight?: string; - /** Indicates if the select menu should be srollable */ + /** Indicates if the select menu should be scrollable */ isScrollable?: boolean; }