moayadnajd / nativescript-filter-select

A NativeScript plugin to provide an listview widget to select AND filter items
http://codeobia.com
Other
37 stars 19 forks source link

Question - Programatically pushing new values into the selected tags #26

Closed kmuthukrishnan closed 6 years ago

kmuthukrishnan commented 6 years ago

Hi @moayadnajd ,

I am using your component (thanks!) for selecting tags from a large list of tag items. I also allowing users to create their own tag items. I am trying to push these programatically into the filter-select-component. When I do this, the value of nativelement.tags is correctly getting incremented (I can console.log this), but the view does not change. Its only when I reload the UI by going into the filter and tap "done" does the view change and the tags added by the user become visible. Please help me understand:

a. How can I refresh the view to show the programatically added tags without going into the filter component? I have tried running this is ngZone with no luck. b. Can the refresh method help me with this?

Thanks

moayadnajd commented 6 years ago

@kmuthukrishnan please check this playground you can use the refresh method

and i will add feature to add your tag if not exist and remote data url soon

https://play.nativescript.org/?template=play-tsc&id=gDKleZ

kmuthukrishnan commented 6 years ago

Hi @moayadnajd , Thanks, Iam trying the refresh method - it seems to be working. Do let me know when you create the add you tag and remote data url features! Waiting for it :)