[Bugfix] Include onResize/onResizeStart/onResizeEnd in the list of useEffect dependencies
This commit is contained in:
@@ -221,7 +221,18 @@ function ResizeControl({
|
|||||||
return () => {
|
return () => {
|
||||||
selection.on('.drag', null);
|
selection.on('.drag', null);
|
||||||
};
|
};
|
||||||
}, [id, controlPosition, minWidth, minHeight, maxWidth, maxHeight, keepAspectRatio]);
|
}, [
|
||||||
|
id,
|
||||||
|
controlPosition,
|
||||||
|
minWidth,
|
||||||
|
minHeight,
|
||||||
|
maxWidth,
|
||||||
|
maxHeight,
|
||||||
|
keepAspectRatio,
|
||||||
|
onResizeStart,
|
||||||
|
onResize,
|
||||||
|
onResizeEnd,
|
||||||
|
]);
|
||||||
|
|
||||||
const positionClassNames = controlPosition.split('-');
|
const positionClassNames = controlPosition.split('-');
|
||||||
const colorStyleProp = variant === ResizeControlVariant.Line ? 'borderColor' : 'backgroundColor';
|
const colorStyleProp = variant === ResizeControlVariant.Line ? 'borderColor' : 'backgroundColor';
|
||||||
|
|||||||
Reference in New Issue
Block a user