Et2VfsSelectDialog: Fix search waiting for too many characters

This commit is contained in:
nathan 2024-02-21 09:28:06 -07:00
parent a427d3e462
commit 3b65a4a810

View File

@ -769,9 +769,8 @@ export class Et2VfsSelectDialog extends Et2InputWidget(LitElement) implements Se
return; return;
} }
// Start the search automatically if they have enough letters // Start the search automatically if they have something typed
// -1 because we're in keyDown handler, and value is from _before_ this key was pressed if(this._searchNode.value.length > 0)
if(this._searchNode.value.length - 1 > 0)
{ {
this._searchTimeout = window.setTimeout(() => {this.startSearch()}, Et2VfsSelectDialog.SEARCH_TIMEOUT); this._searchTimeout = window.setTimeout(() => {this.startSearch()}, Et2VfsSelectDialog.SEARCH_TIMEOUT);
} }