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

fix: set initial value of fixed-source select fields, if provided #261

Conversation

LandingEllipse
Copy link
Contributor

This simple fix allows an initial/default value to be set for select type fields with fixed source (i.e., drop-down option lists). I believe this classes as a fix, as the readme gives the impression that default values should be generally applicable.

I'm not aware of any downsides to this. If the initial value provided by the user does not match the field's options, the field's value in the constructed form will simply be blank (""). Previously, the first option would always be selected by default.

If the initial value provided by the user does not match the field's options, the field's value will be blank (previously, the first option would be selected by default).
@LandingEllipse
Copy link
Contributor Author

This would partially resolve #227

@danielo515 danielo515 merged commit 311064a into danielo515:master May 14, 2024
3 checks passed
@LandingEllipse LandingEllipse deleted the bugfix/select-type-fixed-source-initial-value branch May 14, 2024 15:25
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

Successfully merging this pull request may close these issues.

2 participants