@contentful/f36-popover
Advanced tools
Comparing version 4.10.2 to 4.10.3
# Change Log | ||
## 4.10.3 | ||
### Patch Changes | ||
- [#2094](https://github.com/contentful/forma-36/pull/2094) [`1bc834c6`](https://github.com/contentful/forma-36/commit/1bc834c65097e5b253b7bc69a96a16121b4e7cc4) Thanks [@massao](https://github.com/massao)! - bump popper version | ||
- Updated dependencies []: | ||
- @contentful/f36-utils@4.10.3 | ||
- @contentful/f36-core@4.10.3 | ||
## 4.10.2 | ||
@@ -4,0 +14,0 @@ |
@@ -38,3 +38,3 @@ var $36WSQ$react = require("react"); | ||
const [popoverElement, setPopoverElement] = $36WSQ$react.useState(null); | ||
const { attributes: popperAttributes , forceUpdate: forceUpdate , styles: popperStyles } = $36WSQ$reactpopper.usePopper(triggerElement, popoverElement, { | ||
const { attributes: popperAttributes , update: update , styles: popperStyles } = $36WSQ$reactpopper.usePopper(triggerElement, popoverElement, { | ||
placement: placement, | ||
@@ -75,6 +75,9 @@ modifiers: [ | ||
$36WSQ$react.useEffect(()=>{ | ||
if (isOpen && forceUpdate) forceUpdate(); | ||
const updatePosition = async ()=>{ | ||
if (isOpen && update) await update(); | ||
}; | ||
updatePosition(); | ||
}, [ | ||
isOpen, | ||
forceUpdate | ||
update | ||
]); | ||
@@ -81,0 +84,0 @@ const popoverGeneratedId = $36WSQ$contentfulf36core.useId(null, 'popover-content'); |
@@ -28,3 +28,3 @@ import $hYGFM$react, {useState as $hYGFM$useState, useEffect as $hYGFM$useEffect, useCallback as $hYGFM$useCallback, useMemo as $hYGFM$useMemo} from "react"; | ||
const [popoverElement, setPopoverElement] = $hYGFM$useState(null); | ||
const { attributes: popperAttributes , forceUpdate: forceUpdate , styles: popperStyles } = $hYGFM$usePopper(triggerElement, popoverElement, { | ||
const { attributes: popperAttributes , update: update , styles: popperStyles } = $hYGFM$usePopper(triggerElement, popoverElement, { | ||
placement: placement, | ||
@@ -65,6 +65,9 @@ modifiers: [ | ||
$hYGFM$useEffect(()=>{ | ||
if (isOpen && forceUpdate) forceUpdate(); | ||
const updatePosition = async ()=>{ | ||
if (isOpen && update) await update(); | ||
}; | ||
updatePosition(); | ||
}, [ | ||
isOpen, | ||
forceUpdate | ||
update | ||
]); | ||
@@ -71,0 +74,0 @@ const popoverGeneratedId = $hYGFM$useId(null, 'popover-content'); |
{ | ||
"name": "@contentful/f36-popover", | ||
"version": "4.10.2", | ||
"version": "4.10.3", | ||
"description": "Forma 36: Popover component", | ||
@@ -10,8 +10,8 @@ "scripts": { | ||
"@babel/runtime": "^7.6.2", | ||
"@contentful/f36-core": "^4.10.2", | ||
"@contentful/f36-core": "^4.10.3", | ||
"@contentful/f36-tokens": "^4.0.1", | ||
"@contentful/f36-utils": "^4.10.2", | ||
"@popperjs/core": "^2.4.4", | ||
"@contentful/f36-utils": "^4.10.3", | ||
"@popperjs/core": "^2.11.5", | ||
"emotion": "^10.0.17", | ||
"react-popper": "^2.2.3" | ||
"react-popper": "^2.3.0" | ||
}, | ||
@@ -18,0 +18,0 @@ "peerDependencies": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
90617
882
Updated@contentful/f36-core@^4.10.3
Updated@popperjs/core@^2.11.5
Updatedreact-popper@^2.3.0