added memo to fix rerendering

This commit is contained in:
paul
2024-09-15 15:31:04 +05:30
parent 70b7b18864
commit 0a07da7d40
3 changed files with 13 additions and 26 deletions

View File

@@ -186,7 +186,7 @@ class Widget extends React.Component {
height: {
label: "Height",
tool: Tools.NUMBER_INPUT,
toolProps: {placeholder: "width", max: this.maxSize.height, min: this.minSize.height},
toolProps: {placeholder: "height", max: this.maxSize.height, min: this.minSize.height},
value: this.state.size.height || 100,
onChange: (value) => this.setWidgetSize(null, value)
},
@@ -510,6 +510,10 @@ class Widget extends React.Component {
})
}
handleDragStart = (event) => {
console.log("dragging event: ", event)
}
renderContent() {
// throw new NotImplementedError("render method has to be implemented")
return (
@@ -519,6 +523,7 @@ class Widget extends React.Component {
)
}
/**
* This is an internal methods don't override
* @returns {HTMLElement}