We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
2.4.1
In an uncontrolled form, after select and then unselect an item, reading form data inonSubmit still gets the selected value for this field.
onSubmit
const onSubmit = useCallback((e: FormEvent) => { e.preventDefault() const formData = new FormData(e.target as HTMLFormElement) alert(JSON.stringify(Object.fromEntries(formData), null, 2)) }, []) return ( <form onSubmit={onSubmit}> <Select name="account_filter" label="Account filter" size="sm"> <SelectItem key="verified">From verified users</SelectItem> <SelectItem key="follows">From accounts you follow</SelectItem> </Select> </form> )
Select
You can see the process in my video attachment.
I'd expect to get empty value for this Select field
macOS
Chrome
The text was updated successfully, but these errors were encountered:
ENG-941 [BUG] - Select value not reset after unselect an item
Sorry, something went wrong.
wingkwong
Successfully merging a pull request may close this issue.
NextUI Version
2.4.1
Describe the bug
In an uncontrolled form, after select and then unselect an item, reading form data in
onSubmit
still gets the selected value for this field.Your Example Website or App
Steps to Reproduce the Bug or Issue
Select
You can see the process in my video attachment.
Expected behavior
I'd expect to get empty value for this Select field
Screenshots or Videos
Screen.Recording.2024-06-01.at.13.11.47.mov
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: