simplufy - suggestison from @rzhao271
This commit is contained in:
Sandeep Somavarapu
2023-09-20 10:55:26 +02:00
committed by GitHub
parent 30605c2548
commit bc8147bc86
@@ -223,8 +223,7 @@ export class IconSelectBox extends Disposable {
focusNextRow(): void {
let nextRowIndex = this.focusedItemIndex + this.numberOfElementsPerRow;
if (nextRowIndex >= this.renderedIcons.length) {
nextRowIndex = (nextRowIndex % this.numberOfElementsPerRow) + 1;
nextRowIndex = nextRowIndex === this.numberOfElementsPerRow ? 0 : nextRowIndex;
nextRowIndex = (nextRowIndex + 1) % this.numberOfElementsPerRow;
}
this.focusIcon(nextRowIndex);
}