Skip to content

Commit

Permalink
[@mantine/core] Collapse: Fixed error thrown when using component wit…
Browse files Browse the repository at this point in the history
…h reduced motion (#2116)

Co-authored-by: Jérémie van der Sande <jeremie.van-der-sande@ubisoft.com>
  • Loading branch information
jvdsande and Jérémie van der Sande committed Aug 14, 2022
1 parent cfefc93 commit ea905bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 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') {
Expand Down Expand Up @@ -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 },
};
Expand Down

0 comments on commit ea905bb

Please sign in to comment.