adding more widget attributes

This commit is contained in:
paul
2024-09-27 16:04:03 +05:30
parent 7b4446d9ee
commit 77b1c5a0f0
16 changed files with 251 additions and 58 deletions

View File

@@ -19,6 +19,7 @@ import { isNumeric, removeKeyFromObject } from "../../utils/common"
// FIXME: the drag drop indicator is not going invisible if the drop happens on the child
// FIXME: once the width and height is set to fit-content, it can no longer be resized
const ATTRS_KEYS = ['value', 'label', 'tool', 'onChange', 'toolProps'] // these are attrs keywords, don't use these keywords as keys while defining the attrs property
@@ -532,7 +533,6 @@ class Widget extends React.Component {
}
setWidgetName(name) {
console.log("named: ", name)
this.updateState({
widgetName: name.length > 0 ? name : this.state.widgetName
})
@@ -544,6 +544,11 @@ class Widget extends React.Component {
*/
setParentLayout(parentLayout){
if (!parentLayout){
// if parent layout is null (i,e the widget is on the canvas)
return {}
}
const {layout, direction, gap} = parentLayout