- Now triggerElement is optional. Moreover you can pass a CSS selector for a trigger element, so you have full control over trigger position.
- Popover is a ParentComponent now, so you should pass only popover content as children. Children won't be evaluated when popover is closed.
<button id="trigger">I'm a trigger</button>
<Popover triggerElement="#trigger">
<div>I'm the content!</div>
</Popover>
- Added
onComputePosition
callback which receivesComputePositionDataReturn
- Popover API is used by default without possibility to disable it.
- Removed props
usePopoverAPI
,popoverAPIMountFallback
,mount
anchorElementSelector
=>anchorElement
. Now you can pass HTML element or CSS selector.
- Popover API enabled by default with mount fallback to
body
- Supported multiple trigger events with modifiers
- Supported custom anchor element
- Added
disabled
prop which disables triggering popover. Popover now also looks atdisabled
state of triggering html element.
- Added new prop:
closeOnEscape
. Iftrue
(by default) the popover will be closed ifEscape
key pressed. ignoreOutsideInteraction
=>closeOnOutsideInteraction
(true
by default)