PeterStaev / NativeScript-Drop-Down

A NativeScript DropDown widget.
Apache License 2.0
105 stars 65 forks source link

nativescript-drop-down:Cannot read property 'open' of undefined #214

Closed dev0304 closed 5 years ago

dev0304 commented 5 years ago

I cannot open dropdown on button click I used below code in my Nativescript Angular Project

let dropdown = this.page.getViewById('ddstates'); dropdown.open();

It shows Cannot read property 'open' of undefined in terminal

PeterStaev commented 5 years ago

Hey @dev0304 , make sure you are calling it in the right place (i.e. the widget has been initialized). Consult with the demos in the repo.

PeterStaev commented 5 years ago

No further response so closing this one for now. In case you still have problems, please provide more details.