This repository was archived by the owner on Nov 9, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ export default function TippyGenerator(tippy) {
3030 const isSingletonMode = singleton !== undefined ;
3131
3232 const [ attrs , setAttrs ] = useState ( { } ) ;
33- const [ mounted , setMounted ] = useState ( false ) ;
3433 const [ singletonContent , setSingletonContent ] = useState ( ) ;
3534 const mutableBox = useMutableBox ( ( ) => ( {
3635 container : ssrSafeCreateDiv ( ) ,
@@ -118,8 +117,6 @@ export default function TippyGenerator(tippy) {
118117 } ) ;
119118 }
120119
121- setMounted ( true ) ;
122-
123120 return ( ) => {
124121 instance . destroy ( ) ;
125122 singleton ?. cleanup ( instance ) ;
@@ -213,13 +210,10 @@ export default function TippyGenerator(tippy) {
213210 } ,
214211 } )
215212 : null }
216- { mounted &&
217- createPortal (
218- render
219- ? render ( toDataAttributes ( attrs ) , singletonContent )
220- : content ,
221- mutableBox . container ,
222- ) }
213+ { createPortal (
214+ render ? render ( toDataAttributes ( attrs ) , singletonContent ) : content ,
215+ mutableBox . container ,
216+ ) }
223217 </ >
224218 ) ;
225219 }
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ exports[`<Tippy /> render prop 1`] = `
2222exports [` <Tippy /> render prop preserve popperOptions 1` ] = `
2323Object {
2424 " modifiers" : Array [
25+ Object {
26+ " enabled" : true ,
27+ " fn" : [Function ],
28+ " name" : " x" ,
29+ " phase" : " main" ,
30+ },
2531 Object {
2632 " enabled" : true ,
2733 " fn" : [Function ],
@@ -31,12 +37,6 @@ Object {
3137 " computeStyles" ,
3238 ],
3339 },
34- Object {
35- " enabled" : true ,
36- " fn" : [Function ],
37- " name" : " x" ,
38- " phase" : " main" ,
39- },
4040 ],
4141 " strategy" : " fixed" ,
4242}
You can’t perform that action at this time.
0 commit comments