atomiks / tippyjs

Tooltip, popover, dropdown, and menu library
https://atomiks.github.io/tippyjs/
MIT License
12.03k stars 520 forks source link

Fix: Don't stringify zIndex #951

Closed bozdoz closed 3 years ago

bozdoz commented 3 years ago

Not sure if this is the right place to add this change. I noticed in tippyjs/react, if you pass:

<Tippy
   zIndex={props.zIndex}
>

with props.zIndex being number | undefined, then z-index defaults to 'undefined' if it's not passed. Maybe this is better solved somewhere else (wherever the props are being merged). Obviously a work-around is zIndex={props.zIndex ?? 9999}, but that seems bizarre for consumers to have to re-establish the API's defaults.

Thoughts?

atomiks commented 3 years ago

I think this is an issue with the React wrapper, the defaults work correctly with the core lib.