Skip to content

Commit

Permalink
chore: bump rc-util
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Dec 9, 2024
1 parent 3b4218f commit 33ad329
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"classnames": "^2.3.2",
"rc-motion": "^2.0.0",
"rc-resize-observer": "^1.3.1",
"rc-util": "^5.38.0"
"rc-util": "^5.44.0"
},
"peerDependencies": {
"react": ">=16.9.0",
Expand Down
9 changes: 7 additions & 2 deletions src/TriggerWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { fillRef, supportRef, useComposeRef } from 'rc-util/lib/ref';
import {
fillRef,
getNodeRef,
supportRef,
useComposeRef,
} from 'rc-util/lib/ref';
import * as React from 'react';
import type { TriggerProps } from '.';

Expand All @@ -21,7 +26,7 @@ const TriggerWrapper = React.forwardRef<HTMLElement, TriggerWrapperProps>(
[getTriggerDOMNode],
);

const mergedRef = useComposeRef(setRef, (children as any).ref);
const mergedRef = useComposeRef(setRef, getNodeRef(children));

return canUseRef
? React.cloneElement(children, {
Expand Down

0 comments on commit 33ad329

Please sign in to comment.