[Bugfix] Include onResize/onResizeStart/onResizeEnd in the list of useEffect dependencies
This commit is contained in:
@@ -221,7 +221,18 @@ function ResizeControl({
|
||||
return () => {
|
||||
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 colorStyleProp = variant === ResizeControlVariant.Line ? 'borderColor' : 'backgroundColor';
|
||||
|
||||
Reference in New Issue
Block a user