-
Notifications
You must be signed in to change notification settings - Fork 20
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
Solution to Select for any type, not just Strings #33
Comments
Good solution, thanks for posting. This would require a change to the field type from |
Thanks for sharing, @Herteby! We may be able to leverage this without an additional type variable by changing the |
For a long time I thought this was impossible to do without writing
toString/fromString
functions for your custom types, but I just realized that you can make it work by instead using the list index of the options as the "value", and then in theonChange
decoder use that index to retrieve the item from the passed in options list.Here's a demo: https://ellie-app.com/7253Q8THR2xa1
The text was updated successfully, but these errors were encountered: