Re: Use a filter on a collection in view mode

19 views
Skip to first unread message

Jonas Nicklas

unread,
May 28, 2013, 5:08:00 PM5/28/13
to seren...@googlegroups.com
Hi Thomas :)

Unfortunately, you can't filter a collection from the view, but there is a handy shortcut for creating a filtered collection in your model:

class Something
  @hasMany "objects"
  @selection "selectedObjects", from: "objects", filter: "selected"

/Jonas


On Tue, May 28, 2013 at 5:03 PM, Thomas Oger <tho...@shotbox.se> wrote:
Hello ! 

I was wondering if there was a way to filter a collection inside a view. Something like :

- collection @objects:filter=selected

Or should I create a property in my model to push those object into a new collection ?

Thanks, I m loving serenade more and more !


--
You received this message because you are subscribed to the Google Groups "Serenade.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to serenadejs+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Thomas Oger

unread,
May 29, 2013, 5:47:11 AM5/29/13
to seren...@googlegroups.com, jo...@elabs.se
Works like a charm, can t wait for a function for filtering though.
Thanks.
Reply all
Reply to author
Forward
0 new messages