Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enum select forms do not update their value in the ui - charka-ui theme #3422

Closed
4 tasks done
Yoseftickx opened this issue Feb 1, 2023 · 1 comment · Fixed by #3429
Closed
4 tasks done

Enum select forms do not update their value in the ui - charka-ui theme #3422

Yoseftickx opened this issue Feb 1, 2023 · 1 comment · Fixed by #3429
Assignees

Comments

@Yoseftickx
Copy link

Yoseftickx commented Feb 1, 2023

Prerequisites

What theme are you using?

chakra-ui

Version

5.0.1

Current Behavior

When using the enum property with a list of simple values in the json schema. The form is rendered as expected however when selecting a value from the select dropdown the ui is never updated to show this new selected value. The form data is however updated with the selected value

Expected Behavior

The chakra-ui select field should update its shown ui to reflect the form data.

Steps To Reproduce

  1. go to playground https://rjsf-team.github.io/react-jsonschema-form/
  2. select numbers example
  3. select chakra-ui theme
  4. try to change the value of the Number enum field - which is a select
  5. observe that the value did not change in the ui
  6. observe that the value DID change in the formdata area

Environment

Your own playground.

Anything else?

playground link
No response

@Yoseftickx Yoseftickx added bug needs triage Initial label given, to be assigned correct labels and assigned labels Feb 1, 2023
@nickgros nickgros removed the needs triage Initial label given, to be assigned correct labels and assigned label Feb 3, 2023
@nickgros
Copy link
Contributor

nickgros commented Feb 3, 2023

Good catch! You are welcome to make a pull request to fix it. @heath-freenome may also take a look to see if recent changes caused a regression.

heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Feb 3, 2023
Fixes: rjsf-team#3422 by using the selected value for the single selection
- Updated the `@rjsf/chakra-ui` `SelectWidget` to properly use the selected value rather than a hard-coded `0` value
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Feb 3, 2023
Fixes: rjsf-team#3422 by using the selected value for the single selection
- Updated the `@rjsf/chakra-ui` `SelectWidget` to properly use the selected value rather than a hard-coded `0` value
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit to heath-freenome/react-jsonschema-form that referenced this issue Feb 3, 2023
Fixes: rjsf-team#3422 by using the selected value for the single selection
- Updated the `@rjsf/chakra-ui` `SelectWidget` to properly use the selected value rather than a hard-coded `0` value
- Updated the `CHANGELOG.md` accordingly
heath-freenome added a commit that referenced this issue Feb 3, 2023
Fixes: #3422 by using the selected value for the single selection
- Updated the `@rjsf/chakra-ui` `SelectWidget` to properly use the selected value rather than a hard-coded `0` value
- Updated the `CHANGELOG.md` accordingly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants