The issue was that the select component had the logic to set metadata inside the normalizeSingleValue method and for html5 select component with default value this part was unreachable. As the normalizeSingleValue method is supposed to return the correct value based on type, it shouldn't contain any side effects like set metadata. In that case, I moved that logic to the separate setMetadata method and using it only when the select component is trying to update the value.
How has this PR been tested?
Unit tests
Checklist:
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation (if applicable)
[x] My changes generate no new warnings
[x] My changes include tests that prove my fix is effective (or that my feature works as intended)
[x] New and existing unit/integration tests pass locally with my changes
[ ] Any dependent changes have corresponding PRs that are listed above
…ult value
Link to Jira Ticket
https://formio.atlassian.net/browse/FIO-8091
Description
The issue was that the select component had the logic to set metadata inside the
normalizeSingleValue
method and for html5 select component with default value this part was unreachable. As thenormalizeSingleValue
method is supposed to return the correct value based on type, it shouldn't contain any side effects like set metadata. In that case, I moved that logic to the separatesetMetadata
method and using it only when the select component is trying to update the value.How has this PR been tested?
Unit tests
Checklist: