Skip to content

Commit 5c76876

Browse files
authored
Merge pull request #411 from jasperfirecai2/fix-cnavgroup
fix(CNavGroup): set default `height` state to 0
2 parents 1ae59ec + 4f3979a commit 5c76876

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/coreui-react/src/components/nav/CNavGroup.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export const CNavGroup: PolymorphicRefForwardingComponent<'li', CNavGroupProps>
5858
HTMLDivElement | HTMLLIElement,
5959
CNavGroupProps
6060
>(({ children, as: Component = 'li', className, compact, idx, toggler, visible, ...rest }, ref) => {
61-
const [height, setHeight] = useState<number | string>()
61+
const [height, setHeight] = useState<number | string>(0)
6262
// eslint-disable-next-line @typescript-eslint/no-explicit-any
6363
const navItemsRef = useRef<any>(null)
6464

0 commit comments

Comments
 (0)