You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You can have enum values for a schema property in {schema}.json as well as in {schema}.ui.json.
If you use enum values in {schema}.json with property type "string" a select field containing the enum values will be generated.
If you use enum values in {schema}.ui.json (within ui:options -> source) these options will be used for generating a select field if you choose the widget to be "list" in {schema}.ui.json as well.
This is a bit confusing imho and you might need to move the enum values from {schema}.json to {schema}.ui.json or vice versa if you choose another handling for the given property.
For example you configured a string property with enum values in the {schema}.json to generate a select list. Then you decide to rather have a "select or other" select list. You would then need to move (or duplicate) the enum values from {schema}.json to {schema}.ui.json which feels complicated and error prone.
My proposal would be to use the enum values from {schema}.json if there are no enum values defined in {schema}.ui.json. This would allow to have all the enum values in {schema}.json, but still be able to use the enum configuration via {schema}.ui.json if someone prefers/needs this (and be compatible with current default {schema}.ui.json definitions).
Btw: I am not exactly sure why the enum configuration via {schema}.ui.json was chosen in the first place. Maybe this isn't even necessary if the enum values from {schema}.json will be used.
Acceptance Criteria
The text was updated successfully, but these errors were encountered:
User Story
You can have enum values for a schema property in {schema}.json as well as in {schema}.ui.json.
If you use enum values in {schema}.json with property type "string" a select field containing the enum values will be generated.
If you use enum values in {schema}.ui.json (within ui:options -> source) these options will be used for generating a select field if you choose the widget to be "list" in {schema}.ui.json as well.
This is a bit confusing imho and you might need to move the enum values from {schema}.json to {schema}.ui.json or vice versa if you choose another handling for the given property.
For example you configured a string property with enum values in the {schema}.json to generate a select list. Then you decide to rather have a "select or other" select list. You would then need to move (or duplicate) the enum values from {schema}.json to {schema}.ui.json which feels complicated and error prone.
My proposal would be to use the enum values from {schema}.json if there are no enum values defined in {schema}.ui.json. This would allow to have all the enum values in {schema}.json, but still be able to use the enum configuration via {schema}.ui.json if someone prefers/needs this (and be compatible with current default {schema}.ui.json definitions).
Btw: I am not exactly sure why the enum configuration via {schema}.ui.json was chosen in the first place. Maybe this isn't even necessary if the enum values from {schema}.json will be used.
Acceptance Criteria
The text was updated successfully, but these errors were encountered: