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} /> );