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.

Dropdown does not select items by default when opened #979

@bmdalex

Description

@bmdalex

Bug Report

Description

Introduced by #900 . We have several issues after introducing open prop and autocontrolled mode.

This is possibly a Downshift issue related to internal state handling when isOpen prop is used in controlled mode.

Steps are to use a dropdown and try opening it:

  1. first with down key
  2. then with up key
  3. then select an item and open by clicking on the trigger

Expected Result

  1. the first item is highlighted by default when opening with down key
  2. the last item is highlighted by default when opening with up key
  3. the selected item is highlighted when opening by clicking on the trigger

Actual Result

  1. the first item is NOT highlighted by default when opening with down key
  2. the last item is NOT highlighted by default when opening with up key
  3. the selected item is NOT highlighted when opening by clicking on the trigger

Here is a link to the expected screener regression that we introduced when merging the PR. 💣

Version

0.22.1

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