PeterStaev / NativeScript-Drop-Down

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

Creating dd element on the fly #199

Closed des-esseintes closed 5 years ago

des-esseintes commented 5 years ago

Hello, is it possible to create an element in js, not in xml? Like, const dd = new DropDown() and so on. Could not find answer to this question. Thanks!

PeterStaev commented 5 years ago

Hey @des-esseintes , there should be no problem to create the element in code, just like any other NativeScript widget. After all Nativescript creates the objects from the XML 😉

des-esseintes commented 5 years ago

Yeah I understand, haha, but cant find the api reference, sorry. Any example, maybe? Thank you!

PeterStaev commented 5 years ago

The API is not much different than what you would do with the built in widgets. So you should be able to adapt the examples there are in the NativeScript docs (for example this one) so they work with the drop down. If you need further assistance our company offers paid support for all of the plugins we have built: https://www.tangrainc.com/subscriptions/

des-esseintes commented 5 years ago

thanks, will try that. would be cool if the documentation contained api reference, though.