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 +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,8 @@ function Tippy({
3030 isVisible,
3131 isEnabled = true ,
3232 ignoreAttributes = true ,
33- ...nativeProps
33+ multiple = true ,
34+ ...restOfNativeProps
3435} ) {
3536 const [ isMounted , setIsMounted ] = useState ( false )
3637 const containerRef = useRef ( ssrSafeCreateDiv ( ) )
@@ -39,8 +40,9 @@ function Tippy({
3940 const isControlledMode = typeof isVisible === 'boolean'
4041
4142 const options = {
42- ...nativeProps ,
4343 ignoreAttributes,
44+ multiple,
45+ ...restOfNativeProps ,
4446 content : containerRef . current ,
4547 }
4648
Original file line number Diff line number Diff line change @@ -168,14 +168,15 @@ describe('<Tippy />', () => {
168168
169169 test ( 'nesting' , ( ) => {
170170 render (
171- < Tippy content = "tooltip" placement = "bottom" multiple >
172- < Tippy content = "tooltip" placement = "left" multiple >
173- < Tippy content = "tooltip" >
171+ < Tippy content = "tooltip" placement = "bottom" isVisible >
172+ < Tippy content = "tooltip" placement = "left" isVisible >
173+ < Tippy content = "tooltip" isVisible >
174174 < button > Text</ button >
175175 </ Tippy >
176176 </ Tippy >
177177 </ Tippy > ,
178178 )
179+ expect ( document . querySelectorAll ( '.tippy-popper' ) . length ) . toBe ( 3 )
179180 } )
180181
181182 test ( 'props.isEnabled initially `true`' , ( ) => {
You can’t perform that action at this time.
0 commit comments