mirror of
https://github.com/strapi/strapi.git
synced 2025-08-04 06:49:16 +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
|
||||
useLayoutEffect(() => {
|
||||
if (!isLoading && tooltipRef.current) {
|
||||
tooltipRef.current.updatePosition();
|
||||
// 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();
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
||||
}, [isLoading]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user