You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use It for select products and then add items to form array. After users select an element we are cleaning items for new request to the api remote data.
I want to add "autofocus" property to input search. I try with this code but this doesn't work.
Hi,
Many thanks for develop this component.
I want to use It for select products and then add items to form array. After users select an element we are cleaning items for new request to the api remote data.
I want to add "autofocus" property to input search. I try with this code but this doesn't work.
In html:
<ngx-select [items]="product_items" placeholder="Search..." optionValueField="name" optionTextField="name" [searchCallback]="searchCallback" (typed)="searchProductsTyped.next($event)" (selectionChanges)="addChargeItem($event)" #searchProductsInput>
component.ts:
@ViewChild('searchProductsInput', { static: false }) searchProductsInput: ElementRef;
and then:
this.searchProductsInput.nativeElement.focus();
I get this error:
ERROR TypeError: Cannot read property 'focus' of undefined
Thanks for your help.
The text was updated successfully, but these errors were encountered: