Simulate click on mdb-select from typescript


Topic: Simulate click on mdb-select from typescript

pboidi pro asked 6 years ago

Good afternoon Mdb support, 

There is a way to reproduce the click on a mdb-select from the ts? The goal is force the component to open the multiselect panel after a click on a button. I can access to the resource with a QueryList of SelectComponents and obtain the correct SelectComponent contained into the _result array, but from this point i've got no clue for how simulate the click.  There is a click() method or something similar?

 

modifyDropdown(item) {
this.parent.modifyDropdownFromFather();
const id = 'multiSelect' + item;
console.log(this.dropdowns._results[item]);
}

Damian Gemza staff answered 6 years ago

Dear @pboidi 

Unfortunately, for now, there's no possibility to open the Select component from the ts file.

I'll add this feature to our nice-to-have list, and we'll add it in the future.

Best Regards,

Damian


Damian Gemza staff answered 6 years ago

Dear pboidi,

After upgrading your application to the MDB Angular 7.4.0 you will be able to open the Select dropdown by using the .show() method available in the mdb-select component.

Best Regards,

Damian


ak.leimrey pro commented 6 years ago

May I add that you guys are on FIRE lately? Very pleased how and what suggestions made it into the 7.4.0


Damian Gemza staff commented 6 years ago

Glad to hear that kind works from you! We're doing our best to provide the best code for our customers :)


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 6.3.0
  • Device: Desktop
  • Browser: Chrome
  • OS: Windows 10
  • Provided sample code: Yes
  • Provided link: No