[MGNLUI-6680] ComboBox nested within SwitchableField doesn't display defaultValue when it's Boolean type Created: 29/Apr/21  Updated: 29/Apr/21  Resolved: 29/Apr/21

Status: Closed
Project: Magnolia UI
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
duplicate
is duplicated by MGNLUI-6627 defaultValue not working for fields i... Closed
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

 Description   

Steps to reproduce

  1.  Create a component which has a Combobox field within a Switchable Field, e.g:
    label: Test
    
    form:
      properties:
        test1:
          $type: switchableField
          itemProvider:
            $type: jcrChildNodeProvider
          field:
            $type: comboBoxField
            defaultValue: false
            datasource:
              $type: optionListDatasource
              options:
                - name: false
                  value: false
                  label: no
                - name: true
                  value: true
                  label: yes
  2.  Create the dialog and check the result

Expected results

Value false is pre-selected

Actual results

No value is selected

Workaround

N/A

Development notes

If the Combobox field is not nested within a Switchable field, the defaultValue property works and the false option is pre-selected when the dialog opens


Generated at Mon Feb 12 09:38:56 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.