Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Commit c5aa48d

Browse files
committed
fix: deepPreserveProps for render prop
1 parent 7198256 commit c5aa48d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Tippy.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ export default function TippyGenerator(tippy) {
141141

142142
const {instance} = mutableBox;
143143

144+
if (
145+
instance.props.popperOptions?.modifiers?.find(
146+
i => i.name === '$$tippyReact',
147+
)
148+
) {
149+
console.log(
150+
deepPreserveProps(instance.props, computedProps).popperOptions,
151+
);
152+
}
153+
144154
instance.setProps(deepPreserveProps(instance.props, computedProps));
145155

146156
// Fixes #264
@@ -180,7 +190,9 @@ export default function TippyGenerator(tippy) {
180190
popperOptions: {
181191
...instance.props.popperOptions,
182192
modifiers: [
183-
...(instance.props.popperOptions?.modifiers || []),
193+
...(instance.props.popperOptions?.modifiers || []).filter(
194+
({name}) => name !== '$$tippyReact',
195+
),
184196
{
185197
name: '$$tippyReact',
186198
enabled: true,

0 commit comments

Comments
 (0)