[5.x] Fix suggested options in Field Conditions builder #10650
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request fixes an issue with the suggested fields in the Field Conditions builder, after changes to how field options are stored in #10467.
Say you have a Button Group or Select field that looks like this:
Then, when you add another field to the blueprint and configure a field condition, it'll save like this:
The saved value for this field condition is the "label" for the option, not the key or the value. This means the field condition won't actually work.
This is happening due to the format the options are saved in. The
normalizeInputOptions
only picks up on thevalue
(which is the "label"). It doesn't know about using thekey
, if it exists.