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

Inconsistent display of selected option in select control #204

Closed
cayblood opened this issue Jun 26, 2023 · 4 comments
Closed

Inconsistent display of selected option in select control #204

cayblood opened this issue Jun 26, 2023 · 4 comments

Comments

@cayblood
Copy link

I'm having trouble with a select control that seems not to display the selected value consistently. In this codesandbox example:

https://codesandbox.io/p/sandbox/remix-forms-selected-error-64zntt?file=%2Fapp%2Froutes%2F_index.tsx%3A16%2C1

The select control for State should be displaying a selected value, but it's not, at least not consistently. Thanks in advance for taking a look.

@danielweinmann
Copy link
Contributor

Hey, @cayblood! Thanks for creating this issue :)

I wasn't able to run your codesandbox. It's saying "Error: listen EADDRINUSE: address already in use :::3000".

But one thing caught my eye: you're passing value to all Fields in your form's children and also passing incomplete values to Form.

In theory, this shouldn't be a problem, but can you try removing values from Form and see what happens?

Also, if you fix the codesandbox, I'll gladly take a look at it and see if I can understand what's going on o/

@cayblood
Copy link
Author

cayblood commented Jun 27, 2023

Thanks, @danielweinmann. I appreciate your time. I'm not sure why it's so hard to get codesandbox to create a true fork of my code base. It seems to only allow one copy to run at a time. Anyhow, I've altered the sandbox and I think it might work now, if you just run npm run dev in the terminal. Your suggestion of removing the values from the Form element didn't seem to change anything.

@cayblood
Copy link
Author

By the way, @danielweinmann, I used to ask you guys questions about this library on your discord. Is that closed? I can't remember if I left the server or not, but I don't seem to have it in my server list anymore, and the invite on dx.seasoned.cc has expired.

@cayblood
Copy link
Author

@danielweinmann thanks again for helping me troubleshoot this. I've updated the codesandbox with the fix we came up with. I'll close this issue now.

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

2 participants