Also I want to focus the div tag which has been selected by user in searchbox
On Tuesday, September 17, 2019, Dev C <[email protected]> wrote: > Thanks Sander > > @ViewChildren('dataw') rows: QueryList<ElementRef> |undefined > > and in method > > SetListFocus(){ > > this.rows.first.nativeElement.focus(); > > > } > > I did this but not working. > > On Tuesday, September 17, 2019, Sander Elias <[email protected]> > wrote: > >> Well, viewChild returns the occurrence of the template var. ngFor >> probably has multiple. also, its getting set afterViewInit. >> Try using @viewChildren it has a queryList that you can iterate over for >> multiple instances >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Angular and AngularJS discussion" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit https://groups.google.com/d/ms >> gid/angular/ef2fd72f-db08-45a1-91ff-1f5378adf05c%40googlegroups.com >> <https://groups.google.com/d/msgid/angular/ef2fd72f-db08-45a1-91ff-1f5378adf05c%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > > > -- > Sent from my mi note 4 phone. > -- Sent from my mi note 4 phone. -- You received this message because you are subscribed to the Google Groups "Angular and AngularJS discussion" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/angular/CAKVZMjBo3GM-%3DSxJyB5oNF4r-Rh4dEUdnaa%3DNhPhVkOJhV-9ng%40mail.gmail.com.
