multiselect onPanelShow sets the focus to filter

UI Components for Angular
Post Reply
pilar
Posts: 6
Joined: 27 Feb 2017, 14:49

14 Mar 2019, 10:41

Hello!

How could I indicate to p-multiselect component that the focus must be set on filter when the options panel is opened?

I've tried the following solution but seems doesn't work:

component.html

Code: Select all

<p-multiSelect #type  (onPanelShow)="setFocusToFilter()"
component.ts

Code: Select all

 @ViewChild("type") typeDom;
setFocusToFilter() {
    this.typeDom.filterInputChild.nativeElement.focus();
Would you have any suggestions?

Many thanks,
Pilar

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests