From 6bdcf1a0f3876f03f3ac864edc63deb2daccf92a Mon Sep 17 00:00:00 2001 From: Charles de Dreuille Date: Mon, 13 Oct 2025 18:42:23 +0100 Subject: [PATCH] Update Menu.tsx Signed-off-by: Charles de Dreuille --- packages/ui/src/components/Menu/Menu.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/ui/src/components/Menu/Menu.tsx b/packages/ui/src/components/Menu/Menu.tsx index 410f1e2e1d..34eac8a128 100644 --- a/packages/ui/src/components/Menu/Menu.tsx +++ b/packages/ui/src/components/Menu/Menu.tsx @@ -90,6 +90,7 @@ export const Menu = (props: MenuProps) => { virtualized = false, maxWidth, maxHeight, + style, ...rest } = cleanedProps; @@ -127,7 +128,7 @@ export const Menu = (props: MenuProps) => { } - style={{ width: newMaxWidth, maxHeight }} + style={{ width: newMaxWidth, maxHeight, ...style }} {...rest} /> ); @@ -167,6 +168,7 @@ export const MenuListBox = (props: MenuListBoxProps) => { virtualized = false, maxWidth, maxHeight, + style, ...rest } = cleanedProps; let newMaxWidth = maxWidth || (virtualized ? '260px' : 'undefined'); @@ -175,7 +177,7 @@ export const MenuListBox = (props: MenuListBoxProps) => { ); @@ -209,6 +211,7 @@ export const MenuAutocomplete = (props: MenuAutocompleteProps) => { virtualized = false, maxWidth, maxHeight, + style, ...rest } = cleanedProps; const { contains } = useFilter({ sensitivity: 'base' }); @@ -219,7 +222,7 @@ export const MenuAutocomplete = (props: MenuAutocompleteProps) => { } - style={{ width: newMaxWidth, maxHeight }} + style={{ width: newMaxWidth, maxHeight, ...style }} {...rest} /> ); @@ -283,6 +286,7 @@ export const MenuAutocompleteListbox = ( virtualized = false, maxWidth, maxHeight, + style, ...rest } = cleanedProps; const { contains } = useFilter({ sensitivity: 'base' }); @@ -293,7 +297,7 @@ export const MenuAutocompleteListbox = ( className={clsx(classNames.content, styles[classNames.content])} renderEmptyState={() => } selectionMode={selectionMode} - style={{ width: newMaxWidth, maxHeight }} + style={{ width: newMaxWidth, maxHeight, ...style }} {...rest} /> );