HTML Tree: Search by typing loops instead of starting from beginning

Closes #2559
This commit is contained in:
Adomas Venčkauskas 2022-04-22 10:58:25 +03:00
parent 3d09ab4f18
commit d9463daa66

View file

@ -637,7 +637,7 @@ class VirtualizedTable extends React.Component {
} }
} }
else { else {
for (let i = 0; i < rowCount; i++) { for (let i = this.selection.focused + 1; i == this.selection.focused; i = (i + 1) % rowCount) {
let rowString = this.props.getRowString(i); let rowString = this.props.getRowString(i);
if (rowString.toLowerCase().indexOf(this._typingString) == 0) { if (rowString.toLowerCase().indexOf(this._typingString) == 0) {
if (i != this.selection.focused) { if (i != this.selection.focused) {