Skip to content

Implement closeOnChange for removeItemOnBackspace and handleLabelRemove #4491

Open
@stevenrick

Description

@stevenrick

Feature Request

Problem description

I noticed that #1252 implemented an optional prop closeOnChange for Multiple Selection Dropdown that only works when selecting an item to add but does not apply when removing an item.

Proposed solution

Add this.closeOnChange(e) to the end of the following functions: removeItemOnBackspace and handleLabelRemove which are both in src/modules/Dropdown/Dropdown.js

MVP

Proof of concept (showing the problem): https://codesandbox.io/p/sandbox/semantic-ui-react-closeonchange-poc-69t37k
Add items to selection, then remove items via label or backspace while dropdown is focused/open and element will remain open

Forked, Cloned, Installed, and Tested in PR #4492

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions