Prevent adding form steps inside other form steps and fix illegalChildren usage
This commit is contained in:
parent
86dbd918f2
commit
8cb9870cf7
|
@ -46,7 +46,7 @@
|
|||
<ActionMenu disabled={!item.isCategory}>
|
||||
<ActionButton
|
||||
icon={item.icon}
|
||||
disabled={isChildAllowed(item, $selectedComponent)}
|
||||
disabled={!item.isCategory && isChildAllowed(item, $selectedComponent)}
|
||||
quiet
|
||||
size="S"
|
||||
slot="control"
|
||||
|
@ -66,6 +66,7 @@
|
|||
dataCy={`component-${item.name}`}
|
||||
icon={item.icon}
|
||||
on:click={() => onItemChosen(item)}
|
||||
disabled={isChildAllowed(item, $selectedComponent)}
|
||||
>
|
||||
{item.name}
|
||||
</MenuItem>
|
||||
|
|
|
@ -1702,7 +1702,7 @@
|
|||
"name": "Form",
|
||||
"icon": "Form",
|
||||
"hasChildren": true,
|
||||
"illegalChildren": ["section"],
|
||||
"illegalChildren": ["section", "form"],
|
||||
"actions": [
|
||||
"ValidateForm",
|
||||
"ClearForm",
|
||||
|
@ -1764,9 +1764,9 @@
|
|||
},
|
||||
"formstep": {
|
||||
"name": "Form Step",
|
||||
"icon": "Form",
|
||||
"icon": "AssetsAdded",
|
||||
"hasChildren": true,
|
||||
"illegalChildren": ["section"],
|
||||
"illegalChildren": ["section", "form", "form step"],
|
||||
"styles": ["size"],
|
||||
"settings": [
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue