Skip to content

Select component inside a conditional container displays the value instead of the label when displaying a submission #6185

@evancook11

Description

@evancook11

Describe the bug
When a select component is placed inside a container, if the container is displayed conditionally, the select component will display the selected option's value instead of the label. This happens when the renderMode is html.

Version/Branch
https://cdn.form.io/js/formio.embed.js

To Reproduce
Steps to reproduce the behavior:

  1. Create a form with any component and a container that is displayed depending on the first component. Inside the container, place a select component with a couple of options to select.
  2. Create a submission for the form, using a value for the first component that will get the container to be displayed.
  3. Display the form with the filled in submission, with renderMode set to html
  4. See error

Expected behavior
The select component should display the label instead of the value, like it does when it's not in a conditionally displayed container

Screenshots
Image

Additional context
See this codepen for a demo of the bug
https://codepen.io/Evan-Cook/pen/zxvxYMz

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions