From 910556cfbfc5e67147640d93214c287cc4f4152b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20van=20der=20Sande?= Date: Sun, 14 Aug 2022 11:43:14 +0200 Subject: [PATCH] [@mantine/core] fixed issue when using collapse with reduced motion --- src/mantine-core/src/Collapse/use-collapse.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mantine-core/src/Collapse/use-collapse.ts b/src/mantine-core/src/Collapse/use-collapse.ts index 384f3c1c714..3aeef2955bb 100644 --- a/src/mantine-core/src/Collapse/use-collapse.ts +++ b/src/mantine-core/src/Collapse/use-collapse.ts @@ -1,6 +1,6 @@ import React, { useState, useRef } from 'react'; import { flushSync } from 'react-dom'; -import { useDidUpdate, useMergedRef } from '@mantine/hooks'; +import { useDidUpdate, mergeRefs } from '@mantine/hooks'; function getAutoHeightDuration(height: number | string) { if (!height || typeof height === 'string') { @@ -108,7 +108,7 @@ export function useCollapse({ return { 'aria-hidden': !opened, ...rest, - [refKey]: useMergedRef(el, theirRef), + [refKey]: mergeRefs(el, theirRef), onTransitionEnd: handleTransitionEnd, style: { boxSizing: 'border-box', ...style, ...styles }, };