-
Couldn't load subscription status.
- Fork 401
Description
Version
Identified in 2.6.0
Validated in 3.2.3 via docs
Steps to reproduce
http://ericgio.github.io/react-bootstrap-typeahead/#asynchronous-searching
In the pagination section,
- search for "al" and validate that you have the option to paginate
- search for "def" and validate that you have the option to paginate
- paginate your results (the "def" search) at least once
- select all text and type "al" (do not blur the input)
- validate that you no longer have the option to paginate
Expected Behavior
The search for "al" in the scenario above should still show pagination controls as there is more data to display. We have limited results from the api call, but could get more if the user desires.
(note: the following may be related to async only, I'd have to think through what I'd expect in a standard typeahead)
The pagination construct is a function of the search string that you are executing, so any changes to that search string should reset the pagination settings.
Actual Behavior
shownResults is left at 2 * maxResults (after one pagination on "def"), but the max number of results the api returns for "al" is 50. Since the number of "al" results is less than the shownResults, the pagination controls are not rendered.
The typeahead does reset the shownResults value if you hide the menu as it resets a few state values to the initial props (typeaheadContainer -> _hideMenu).