Skip to content

AsyncTypeahead: Previous menu options not cleared before next search #686

@NateFaulkenberry

Description

@NateFaulkenberry

Version

6.0.0-alpha.6 (though I believe this bug exists in version 5 as well)

Steps to reproduce

  1. Navigate to the Asynchronous Search on the example page:
    https://ericgio.github.io/react-bootstrap-typeahead/#asynchronous-searching
  2. Enter "the" into the input - search results for "the" will display in the menu - expected
  3. Delete "the" from the input - the menu will close - expected
  4. Enter "test" into the input - the previous options for "the" will render in the menu for the duration of delay prop on AsyncTypeahead component - unexpected

Expected Behavior

The menu should display the value for searchText prop when a new search begins

Note: I did try several workarounds to clear the options using onMenuToggle prop, however this produced unwanted side effects

Actual Behavior

The menu displays options from the previous search results

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions