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
For schema elements with enumerations that get conditionally constrained, the form library validates correctly, but still displays the enumeration values that are no longer valid.
I would expect that if an enumeration has 3 valid values, but is conditionally constrained to 2 of those, that only the 2 remaining valid values would be displayed.
When selecting "Value 1" for "Enum Value", I would expect "Second Enum Value" to only display "Value 4" and "Value 5" as valid options rather than all of the original enum values.
Validation shows an error correctly when "Value 6" is selected, but I would expect preventing the user from selecting "Value 6" in the first place.
@epicfaace Other methods, such as anyOf or oneOf, create multiple schemas rather that limiting a single schema. This results in the second down-down-list to pick which schema to match to (like the example on this issue: #1586).
This provides a less-than-ideal user experience. Ideally, we'd have a way to limit values displayed in a single drop-down rather than multiple schemas.
Prerequisites
Description
For schema elements with enumerations that get conditionally constrained, the form library validates correctly, but still displays the enumeration values that are no longer valid.
I would expect that if an enumeration has 3 valid values, but is conditionally constrained to 2 of those, that only the 2 remaining valid values would be displayed.
Steps to Reproduce
Example Schema:
Expected behavior
When selecting "Value 1" for "Enum Value", I would expect "Second Enum Value" to only display "Value 4" and "Value 5" as valid options rather than all of the original enum values.
Validation shows an error correctly when "Value 6" is selected, but I would expect preventing the user from selecting "Value 6" in the first place.
Actual behavior
"Value 6" is still displayed.
Version
Playground: https://rjsf-team.github.io/react-jsonschema-form/
The text was updated successfully, but these errors were encountered: