From 09a53391c1b32424d58a527a0ae3974665345b4a Mon Sep 17 00:00:00 2001 From: csandman Date: Thu, 26 Oct 2023 19:15:44 -0400 Subject: [PATCH] Fix GroupHeading props --- src/chakra-components/menu.tsx | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/chakra-components/menu.tsx b/src/chakra-components/menu.tsx index 1705706..86659e3 100644 --- a/src/chakra-components/menu.tsx +++ b/src/chakra-components/menu.tsx @@ -14,7 +14,7 @@ import type { OptionProps, } from "react-select"; import type { SizeProps, ThemeObject } from "../types"; -import { useSize } from "../utils"; +import { cleanCommonProps, useSize } from "../utils"; const alignToControl = (placement: CoercedMenuPlacement) => { const placementToCSSProp = { bottom: "top", top: "bottom" }; @@ -288,11 +288,12 @@ export const GroupHeading = < const { cx, className, - children, // eslint-disable-next-line deprecation/deprecation selectProps: { chakraStyles, size: sizeProp, hasStickyGroupHeaders }, } = props; + const { data, ...innerProps } = cleanCommonProps(props); + const menuStyles = useMultiStyleConfig("Menu"); const size = useSize(sizeProp); @@ -325,9 +326,11 @@ export const GroupHeading = < : initialSx; return ( - - {children} - + ); };