Skip to content

Commit

Permalink
Fixed #2737 - Dropdown throws a JS exception related to searchIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Apr 10, 2022
1 parent 0c3e7b0 commit 6935502
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/lib/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ export const Dropdown = React.memo(React.forwardRef((props, ref) => {

if (searchValue.current) {
const searchIndex = getSelectedOptionIndex();
const newOption = props.optionGroupLabel ? searchOptionInGroup(searchIndex) : searchOption(++searchIndex);
const newOption = props.optionGroupLabel ? searchOptionInGroup(searchIndex) : searchOption(searchIndex + 1);
if (newOption) {
selectItem({
originalEvent: event,
Expand Down

0 comments on commit 6935502

Please sign in to comment.