[Bugfix] Include onResize/onResizeStart/onResizeEnd in the list of useEffect dependencies

This commit is contained in:
Serhii Holinei
2023-06-05 18:48:24 -04:00
committed by moklick
parent 01bd4675f4
commit d3ddbfa7a7

View File

@@ -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';