jsonform / jsonform

Build forms from JSON Schema. Easily template-able. Compatible with Bootstrap 3 out of the box.
https://jsonform.github.io/jsonform/playground/index.html
MIT License
2.72k stars 553 forks source link

Bug in selectedfieldset when using enums #413

Closed jmalcaraz closed 1 year ago

jmalcaraz commented 1 year ago

Hi, i have discovered a bug that would like to report. It is related to the "readonly" and "disabled" properties that are not being enforced when there is a "selectedfieldset" and it applies for those selected fields that contains an enum. The properties work well with they are not enums.

The way to reproduce the error is very simple as it there is a JSON Playground almost ready for that "Fields - Alternative - the selectedfieldset type", just try to disable/readonly the "category" availble in such playground and you will realise.

P.S. Thanks a lot for the library, it is really useful.

sdetweil commented 1 year ago

don't think it's a bug, so much as a limitation of the core behavior

some choices https://stackoverflow.com/questions/14019670/how-to-prevent-a-select-from-being-changed

so you would add an onChange element/function to your form for this/these fields..

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.