skohub-io / skohub-editor

Apache License 2.0
5 stars 4 forks source link

Pre-select when `enum` has single value #4

Open acka47 opened 4 years ago

acka47 commented 4 years ago

See, e.g. this schema: https://github.com/lobid/lobid.github.com/blob/d3232d016663a689727add65356412f17cd5cef7/data/2019-09-xx-oer-schema.json

Twice (here and here), there is only one value enumerated for type. It would be nice if it was pre-selected in the respective dropdown.

acka47 commented 3 years ago

I just noticed that there also is const in JSON Schema, see https://json-schema.org/understanding-json-schema/reference/generic.html#constant-values. We might also use this for pre-selecting values...