- Resolved type declaration issue that caused ts errors when rendering Popover component on certain versions of React
- Popover now immediately positions on open before requesting browser animation frame for subsequent updates (thanks @cozmo)
- Popover now re-renders properly on the following prop changes
reposition
positions
boundaryElement
boundaryInset
transform
transformMode
childRect
changespopoverRect
changespadding
align
- Prior to this change, the portal DOM elements generated when a popover appears
were given the id
react-tiny-popover-container
andreact-tiny-popover-scout
- From now on, both
react-tiny-popover-container
andreact-tiny-popover-scout
are now assigned as class names rather than ids. The absence of this functionality has been an oversight, since multiple popovers can be present in the DOM simultaneously. This resulted in more than one element having the same id.
align
andpadding
no longer erroneously required as props
- Removed some debugging statements erroneously published
- Rolled back
DOMRect
changes as it interferes with SSR, replaced with customRect
interface that mirrors the same API
contentLocation
prop has been renamed topositionTransform
, behaves exactly the samepositions
prop now accepts a single string in addition to an array of prioritized strings- Migrated from deprecated
ClientRect
toDOMRect
(thanks @jafin)
- A new
transformMode
prop now accepts string values of"absolute"
or"relative"
."absolute"
mode is its default, and causes behavior identical tocontentLocation
. The"relative"
value, however, will cause the providedtop
andleft
values of the transform to merely be summed to the existingnudgeTop
andnudgeLeft
values, behaving as a relative positioning system.
- popover positioning miscalculation issue
- blurry popover on non-retina displays (thanks @D34THWINGS)
- click-outside support now works across different windows (thanks @dutziworks)
- added
clickOutsideCapture
prop toPopover
- added
violations
property toPopoverState
- added
hasViolations
property toPopoverState
- React 18 is now an accepted peer dependency
onClickOutside
now uses event capturing (thanks @davidjgross)
usePopover
now returns immediately when popover is not open, fixing an issue where utility and positioning functions sometimes fired even when popover was not open
- Issue where popovers within a new stacking context would sometimes not render at the correct position
- SSR support
boundaryElement
prop
- Renamed
containerParent
toparentElement
- Popovers not rendering at proper location within translated container elements
- Removed
custom
string type fromposition
andalign
props, replaced withundefined
useArrowContainer
does not render an arrow ifposition
isundefined
ArrowContainer
now handles custom class names properly (thanks KWLEvans)
- Inline source maps