Remove Frame Delay from Focus Move Code
This commit is contained in:
1 parent
5de6d111f2
commit
c21845a579
1 file changed
+2
-2
@@ -165,12 +165,12 @@ export class Dropdown implements OnInit {
|
||||
this.searchQuery.set('');
|
||||
this.focusedIndex.set(this.normalizedOptions().findIndex((o) => o.value === this.value()));
|
||||
|
||||
requestAnimationFrame(() => {
|
||||
setTimeout(() => {
|
||||
const searchInputElement = this.searchInput()!.nativeElement;
|
||||
|
||||
searchInputElement.focus();
|
||||
this.setCursorToEnd(searchInputElement);
|
||||
});
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user