fix(resizer): minWidth and mminHeight dynamic props

This commit is contained in:
moklick
2022-12-06 19:42:00 +01:00
parent 527cf13352
commit 2f477f384f
3 changed files with 9 additions and 2 deletions
+7
View File
@@ -1,5 +1,12 @@
# @reactflow/node-resizer # @reactflow/node-resizer
## 1.0.2
### Patch Changes
- fix `minWidth` and `minHeight` so that it can be used dynamically
## 1.0.1 ## 1.0.1
### Patch Changes ### Patch Changes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@reactflow/node-resizer", "name": "@reactflow/node-resizer",
"version": "1.0.1", "version": "1.0.2",
"description": "A helper component for resizing nodes.", "description": "A helper component for resizing nodes.",
"keywords": [ "keywords": [
"react", "react",
+1 -1
View File
@@ -154,7 +154,7 @@ function ResizeControl({
return () => { return () => {
selection.on('.drag', null); selection.on('.drag', null);
}; };
}, [id, controlPosition, getPointerPosition]); }, [id, controlPosition, minWidth, minHeight, getPointerPosition]);
const positionClassNames = controlPosition.split('-'); const positionClassNames = controlPosition.split('-');
const colorStyleProp = variant === ResizeControlVariant.Line ? 'borderColor' : 'backgroundColor'; const colorStyleProp = variant === ResizeControlVariant.Line ? 'borderColor' : 'backgroundColor';