[MGNLUI-6860] Switchable ignores SubForm Layout Definition Created: 03/Sep/21 Updated: 09/May/23 |
|
| Status: | Open |
| Project: | Magnolia UI |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Alexander Hems | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
| Template: | |
| Acceptance criteria: |
Empty
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
| Date of First Response: | |
| Epic Link: | FieldsMaintenance |
| Team: |
| Description |
Steps to reproduce
switchable:
$type: switchableField
field:
$type: radioButtonGroupField
layout: horizontal
defaultValue: option1
datasource:
$type: optionListDatasource
options:
- name: option1
value: option1
label: option1
- name: option2
value: option2
label: option2
itemProvider:
$type: currentItemProvider
forms:
- name: option1
layout:
$type: horizontal
properties:
option1field1:
$type: textField
label: option1field1
option1field2:
$type: textField
label: option1field2
- name: option2
layout:
$type: tabbedLayout
tabs:
tab1:
fields:
- name: option2field1
tab2:
fields:
- name: option2field2
properties:
option2field1:
$type: textField
label: option2field1
option2field2:
$type: textField
label: option2field2
Expected resultsI would expect the form definition to be used as described in your own documentation. Actual resultsIt is always a vertical layout, no matter what I define in the YAML. WorkaroundAs a Workaround to add more flexibility to the forms, we add a custom SwitchableFieldDefinition and a Clone of the SwitchableFormView. Development notes |