Skip to content

Fix enum dropdown showing a selection for unset fields - #928

Open
mihaelabalutoiu wants to merge 1 commit into
cloudbase:masterfrom
mihaelabalutoiu:fix-unset-enum-field-selection
Open

Fix enum dropdown showing a selection for unset fields#928
mihaelabalutoiu wants to merge 1 commit into
cloudbase:masterfrom
mihaelabalutoiu:fix-unset-enum-field-selection

Conversation

@mihaelabalutoiu

Copy link
Copy Markdown
Member

Enum fields with values but no config_default could show the first option as selected while the form value remained unset, so the control displayed a value the form did not hold.
This happened when an enum item had no name or label, producing an undefined label that matched the unset field value.

Skip the lookup when the field has no value, so only config_default or an explicit user selection can select an option.

Avoid matching an unset field value to an enum item with an undefined label.

Signed-off-by: Mihaela Balutoiu <mbalutoiu@cloudbasesolutions.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant