Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Toggling Multiple/Search/etc. Breaks Dropdown #1658

@dvdzkwsk

Description

@dvdzkwsk

Bug Report

If a Dropdown transitions between different modes (i.e. single -> multiple, no search -> search) it breaks. You can workaround the issue by first unmounting it and then rendering it anew with the desired props, but that's brittle and surprising. It looks like the issue has to do with how auto controlled state is managed.

Steps

  1. Render a dropdown with multiple=false
  2. Re-render the same dropdown multiple=true
  3. Observe the runtime error.

Expected Result

Dropdown should have switched modes, i.e. from single to multiple selection.

Actual Result

Dropdown threw a fatal runtime error.

Version

0.34.1

Testcase

https://codesandbox.io/s/lucid-wozniak-ngzyc

Metadata

Metadata

Assignees

No one assigned

    Labels

    vstsPaired with ticket in vsts🧰 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions