danielo515 / obsidian-modal-form

Define forms for filling data that you will be able to open from anywhere you can run JS
https://danielorodriguez.com/obsidian-modal-form/
MIT License
175 stars 13 forks source link

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

Closed LandingEllipse closed 2 months ago

LandingEllipse commented 2 months ago

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.

LandingEllipse commented 2 months ago

This would partially resolve #227