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

Controlled select component does not work when shouldValidate is onInput #357

Open
wgpsutherland opened this issue Dec 7, 2023 · 2 comments

Comments

@wgpsutherland
Copy link

wgpsutherland commented Dec 7, 2023

Describe the bug and the expected behavior

When creating a controlled select component, if the form shouldValidate is onInput, the value in the onChange event is not the one you tried to select, but the current value, meaning you cannot change the value in the select.

onBlur and onSubmit do work, it only onInput that doesn't.

The only difference in conform I can see between onInput and onBlur is the type of event attached to the document here

Conform version

0.9.1

Steps to Reproduce the Bug or Issue

Working code sandbox with a very simple form demonstrating the issue.

What browsers are you seeing the problem on?

Chrome

Screenshots or Videos

No response

Additional context

No response

@edmundhung
Copy link
Owner

Thanks for reporting the issue. This seems to be a problem only on chrome as I tested it on firefox and it works fine there. I will look into it further.

@m-shaka
Copy link

m-shaka commented Feb 7, 2024

I found that onInput validation against Radix-ui's Select(controlled select inside Radix) works neither on Chrome nor Firefox.

Here is an example.

This is a forked version of Radix's official example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants