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

chakra-ui select field calculates isMultiple wrong #3848

Closed
4 tasks done
julianhille opened this issue Aug 31, 2023 · 2 comments
Closed
4 tasks done

chakra-ui select field calculates isMultiple wrong #3848

julianhille opened this issue Aug 31, 2023 · 2 comments
Labels

Comments

@julianhille
Copy link

Prerequisites

What theme are you using?

chakra-ui

Version

5.12.1

Current Behavior

A select widget acts like a multi select even if it should not.

Expected Behavior

A select field when explicitly set to multiple=false through props should not render itself as multiple select field

Steps To Reproduce

Here is a playground link

The issue is this line:

  const isMultiple = typeof multiple !== 'undefined' && Boolean(enumOptions);

this evaluates to true if multiple is set to false from multischema field here

Environment

- OS: linux fedora
- Node: 16.20.0
- npm: 8.19.4

Anything else?

No response

@julianhille julianhille added bug needs triage Initial label given, to be assigned correct labels and assigned labels Aug 31, 2023
julianhille added a commit to julianhille/react-jsonschema-form that referenced this issue Aug 31, 2023
This should fix the logic flaw for the case another field opens the select widget with multiple = false instead of undefined.

Fixes rjsf-team#3848
@julianhille
Copy link
Author

Would also be fixed by #3811

@heath-freenome
Copy link
Member

Fixed by #3811

@heath-freenome heath-freenome removed the needs triage Initial label given, to be assigned correct labels and assigned label Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants