-
Couldn't load subscription status.
- Fork 401
Description
Version
3.2.4
Steps to reproduce
http://ericgio.github.io/react-bootstrap-typeahead/#pagination
In the pagination section
- search for "0"
- use the up arrow key to jump to the "Display additional results..."
- press enter to paginate
Expected Behavior
The selected result is the first from the next page of results. Pressing enter again should have invoke an onSearch with "550", the menu should close (showMenu: false, shownResults: 100) and the input text should reflect "550" (text: '550', activeItem: null, initialItem: '550', activeIndex: -1).
Actual Behavior
The selected result appears to be the first result from the next page. Pressing enter invokes onPaginate. The menu is still open (showMenu: true, shownResults: 300) and the input text still reflects "0" (text: '0', activeItem: { label: 'Display additional results...' }, initialItem: '0', activeIndex: 100).
Additional Detail
After step 2
- MenuItemContainer(BaseMenuItem) with prop position: 100 has a prop option: { label: 'Display additional results...' }
- The respective BaseMenuItem has prop active: true
- TypeaheadContainer(WrapperTypeahead) has state paginationOption: true, activeIndex: 100, activeItem: { label: 'Display additional results...' }, and shownResults: 100
After step 3
- MenuItemContainer(BaseMenuItem) with prop position: 100 has a prop option: '550'
- The respective BaseMenuItem has prop active: true
- TypeaheadContainer(WrapperTypeahead) has state paginationOption: true, activeIndex: 100, activeItem: { label: 'Display additional results...' }, and shownResults: 200