We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
moveSelectionBy()
options
1 parent 2bddf40 commit 1ae4931Copy full SHA for 1ae4931
src/modules/Dropdown/Dropdown.js
@@ -975,11 +975,12 @@ export default class Dropdown extends Component {
975
debug(`offset: ${offset}`)
976
977
const options = this.getMenuOptions()
978
- const lastIndex = options.length - 1
979
980
// Prevent infinite loop
981
- if (_.every(options, 'disabled')) return
+ // TODO: remove left part of condition after children API will be removed
+ if (options === undefined || _.every(options, 'disabled')) return
982
983
+ const lastIndex = options.length - 1
984
// next is after last, wrap to beginning
985
// next is before first, wrap to end
986
let nextIndex = startIndex + offset
0 commit comments