(query-builder) Disabled search value input for unary operator #15011
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.
Closes #14888
This solution adds a dedicated empty disabled input field, which is displayed when there is a need to display a disabled input.
This way, when an unary operator is selected, an empty disabled input is displayed and the original input(containing the search value) is been hidden.
Now if the user returns to a non-unary operator, in the context of the same condition editing session, the input appears enabled again still containing the value before the disabling.
If the user saves the unary condition, the search value is only now cleared and won't reappear if opened for edit again and operator changed to not-unary.
P.S. Following the same approach, the input can be removed all together (rather than substituted with a disabled one)
or the placeholder of the disabled input can be changed to 'n/a', -Empty-, or something else.
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)