Skip to content

SelectMultiple when using object values and expanded handles click wrongly #6737

@urubatan

Description

@urubatan

There is an error in select multiple when using object values in conjunction with showSelectedInline, when the inline item is clicked instead of de-selecting that item it ends up being the only item selected

Expected Behavior

Unselect an inline item when clicked

Actual Behavior

When clicking an inline item it ends up being the only item selected

URL, screen shot, or Codepen exhibiting the issue

The error happens all the time, it is easy to check it in the storybook
(https://storybook.grommet.io/?path=/story/input-selectmultiple-object-options--object-options)

the error is in the line (

? applyKey(v, valueKey || labelKey) ===
applyKey(optionValue, valueKey || labelKey)
: v !== optionValue,
)

the object comparison should be !== like the string value comparison, but it is using ===

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugissue that does not match design or documentation and requires code changes to address

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions