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.
1 parent 8b7ac4b commit fb0586bCopy full SHA for fb0586b
1 file changed
src/list/Base.mjs
@@ -484,11 +484,17 @@ class Base extends Component {
484
getActiveIndex(headerlessIndex) {
485
let delta = 0,
486
i = 0,
487
- records = this.store.items;
+ records = this.store.items,
488
+ len = headerlessIndex;
489
- for (; i <= headerlessIndex; i++) {
490
+ if (records.length < 1) {
491
+ return null;
492
+ }
493
+
494
+ for (; i <= len; i++) {
495
if (records[i].isHeader) {
496
delta++;
497
+ len++;
498
}
499
500
0 commit comments