mirror of
https://github.com/strapi/strapi.git
synced 2025-08-04 14:56:22 +00:00
Fix updatePosition uncaught error
Signed-off-by: HichamELBSI <elabbassih@gmail.com>
This commit is contained in:
parent
02e6f77ac3
commit
f814f8e2ed
@ -56,7 +56,13 @@ const RelationPreviewTooltip = ({ tooltipId, rowId, mainField, name }) => {
|
|||||||
// Used to update the position after the loader
|
// Used to update the position after the loader
|
||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
if (!isLoading && tooltipRef.current) {
|
if (!isLoading && tooltipRef.current) {
|
||||||
|
// A react-tooltip uncaught error is triggered when updatePosition is called in firefox.
|
||||||
|
// https://github.com/wwayne/react-tooltip/issues/619
|
||||||
|
try {
|
||||||
tooltipRef.current.updatePosition();
|
tooltipRef.current.updatePosition();
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [isLoading]);
|
}, [isLoading]);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user