0

I want to open a ngx-select-dropdown on button click in angular component. Can someone have any idea how to do that? I tried

@ViewChild('nexdropdown') nexdropdown: any = SelectDropDownModule;

clickFunction() {
  this.carriercomponent.nativeElement.open();
  //This results TypeError: Cannot read properties of undefined (reading 'open')

  //I tried this too but this says TypeError: this.carriercomponent.open is not a function
  this.carriercomponent.open();
}
Sajjad Ahmed
  • 349
  • 1
  • 3
  • 12
  • Please update to the latest version and you can use the `openDropdown(instanceId:string)` function available with the dropdownService. For more details go through the documentation – Manish Mar 08 '23 at 06:11

0 Answers0