fix for SelectMultiple when using object values inline clicks #6738
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.
When clicking on an inline option for a SelectMultiple that uses objects as options the behavior should be the same as when the options are strings.
This PR fixes the comparison for object values to be the same as for string values
What does this PR do?
changes one line in SelectMultipleValue to make sure the inline option clicked is deselected instead of being the only one selected for object options
Where should the reviewer start?
you can check the current error in storybook
https://storybook.grommet.io/?path=/story/input-selectmultiple-object-options--object-options
when clicking in any inline option that is the only one that is still selected, instead of deselecting only that option
What testing has been done on this PR?
I tested manually on my machine
all existing tests are still working
I didn't add more tests to confirm the bug because my javascript skills aren't good enough and I didn't know how to do that
How should this be manually tested?
opening the storybook for this PR you can verify the correct behavior
What are the relevant issues?
This PR fixes the issue #6737
Do the grommet docs need to be updated?
No, after this PR the docs are correct for all cases
Should this PR be mentioned in the release notes?
no need
Is this change backwards compatible or is it a breaking change?
it just fixes a bug