v-t: Fix freeze when type-to-find wraps and first row is selected
This commit is contained in:
parent
7b7bded5f0
commit
45e0340787
1 changed files with 4 additions and 1 deletions
|
@ -643,7 +643,10 @@ class VirtualizedTable extends React.Component {
|
|||
}
|
||||
}
|
||||
else {
|
||||
for (let i = (this.selection.focused) % rowCount; i != this.selection.focused - 1; i = (i + 1) % rowCount) {
|
||||
// Stop at the row before the selection's focus
|
||||
// but don't set a negative stop point, or we'll loop infinitely
|
||||
let stopRow = Math.max(this.selection.focused - 1, 0);
|
||||
for (let i = (this.selection.focused) % rowCount; i != stopRow; i = (i + 1) % rowCount) {
|
||||
let rowString = this.props.getRowString(i);
|
||||
if (rowString.toLowerCase().indexOf(this._typingString) == 0) {
|
||||
if (i != this.selection.focused) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue