fix: fixed handling of how and when to set ALL option #7244
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.
Summary
Changes
To incorporate the advantages of restricting values while avoiding the issue from the previous implementation, I have made the following changes regarding selection and retention:
The main goal is to provide a natural, intuitive user experience and avoid unexpected modifications from our side.
Related Issues / PR's
Screenshots
Current issue with ALL label selection:
Screen.Recording.2025-03-08.at.2.00.26.PM.mov
Fix:
Screen.Recording.2025-03-08.at.2.01.59.PM.mov
Affected Areas and Manually Tested Areas
Tested -
Tests -
every value in option from BE is present in selectedValue array
Important
Improved handling of 'ALL' option in multi-select scenarios in
VariableItem.tsx
by updating logic to setallSelected
and handling empty input values.VariableItem.tsx
, added logic to setallSelected
when all options are selected in multi-select mode.handleChange
to handle empty input values for multi-select by setting value to an empty array.getOptions
to determineallSelected
by comparing lengths and contents ofselectedValue
andnewOptionsData
.handleChange
to handlemultiSelect
scenarios with empty input values.This description was created by
for ad06b83. It will automatically update as commits are pushed.