[MGNLUI-4789] Selected value in select field is not chosen Created: 13/Nov/18  Updated: 22/Feb/19  Resolved: 22/Feb/19

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

Type: Bug Priority: Neutral
Reporter: Viet Nguyen Assignee: Unassigned
Resolution: Not an issue Votes: 0
Labels: None
Remaining Estimate: 0d
Time Spent: 0.25d
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2018-11-20 at 11.27.02 AM.png     XML File config.modules.stories-app.dialogs.xml    
Issue Links:
causality
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
Release notes required:
Yes
Date of First Response:
Epic Link: LD improvements

 Description   

Thanks to kchristodoulou in SUPPORT-9295:

I have noticed lately that when adding in a yaml file a select field as the following

- name: assetstatus
  fieldType: select
  label: Status
  required: true
  options:
  - name: option1
    value: option1
    selected: true
    label: option1
  - name: option2
    value: option2
    label: option2
  

the selected value is not shown by default when the dialog is opened?

--> Confirmed issue since it's happening on 5.7.1 also. Function 'buildRemoteOptions' is not take into account when running SelectFieldFactory class.



 Comments   
Comment by Viet Nguyen [ 22/Feb/19 ]

Thanks to miruela,

I get it now, so the process is still right, we load the stored data into that field and because it is null or empty before then the default value is not set because it already has a 'null' value!

For a newly created field, it will be selected as configured.

Hope this helps!

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