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}>
|
<ActionMenu disabled={!item.isCategory}>
|
||||||
<ActionButton
|
<ActionButton
|
||||||
icon={item.icon}
|
icon={item.icon}
|
||||||
disabled={isChildAllowed(item, $selectedComponent)}
|
disabled={!item.isCategory && isChildAllowed(item, $selectedComponent)}
|
||||||
quiet
|
quiet
|
||||||
size="S"
|
size="S"
|
||||||
slot="control"
|
slot="control"
|
||||||
|
@ -66,6 +66,7 @@
|
||||||
dataCy={`component-${item.name}`}
|
dataCy={`component-${item.name}`}
|
||||||
icon={item.icon}
|
icon={item.icon}
|
||||||
on:click={() => onItemChosen(item)}
|
on:click={() => onItemChosen(item)}
|
||||||
|
disabled={isChildAllowed(item, $selectedComponent)}
|
||||||
>
|
>
|
||||||
{item.name}
|
{item.name}
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
|
|
@ -1702,7 +1702,7 @@
|
||||||
"name": "Form",
|
"name": "Form",
|
||||||
"icon": "Form",
|
"icon": "Form",
|
||||||
"hasChildren": true,
|
"hasChildren": true,
|
||||||
"illegalChildren": ["section"],
|
"illegalChildren": ["section", "form"],
|
||||||
"actions": [
|
"actions": [
|
||||||
"ValidateForm",
|
"ValidateForm",
|
||||||
"ClearForm",
|
"ClearForm",
|
||||||
|
@ -1764,9 +1764,9 @@
|
||||||
},
|
},
|
||||||
"formstep": {
|
"formstep": {
|
||||||
"name": "Form Step",
|
"name": "Form Step",
|
||||||
"icon": "Form",
|
"icon": "AssetsAdded",
|
||||||
"hasChildren": true,
|
"hasChildren": true,
|
||||||
"illegalChildren": ["section"],
|
"illegalChildren": ["section", "form", "form step"],
|
||||||
"styles": ["size"],
|
"styles": ["size"],
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue