nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - `Select` gets values from `key` prop, not `value`, into native `select` element

Open THOUSAND-SKY opened this issue 1 year ago • 0 comments

NextUI Version

2.2.9

Describe the bug

The values should be coming from the value prop?

E.g. in

https://nextui.org/docs/components/select#custom-items , even if you change textValue to value, the key is used for the actual value.

Uncontrolled form inputs make my life easier, when submitting forms. I'd like the data to match.

Your Example Website or App

https://codesandbox.io/p/devbox/clever-panini-3rrppd?file=%2FApp.jsx%3A15%2C43

Steps to Reproduce the Bug or Issue

  1. Inspect the native "accessibility fallback" select element
  2. Observe the values match the key rather than the value.

Expected behavior

I expected the value prop work as it does in native select, and to be able to pass it on with my form data.

Screenshots or Videos

No response

Operating System Version

Linux

Browser

Firefox

THOUSAND-SKY avatar Jan 24 '24 17:01 THOUSAND-SKY