Filtering results with a local JSON variable?

Mar 18, 2010 at 4:58 PM
Edited Mar 18, 2010 at 5:02 PM
Instead of doing an AJAX request for a JSON list of the items to place in my flexbox, I've just got a local JSON object as a variable with all the data in it. This works fine, and it does highlight the matched results, but it *does not* hide results that did not match. Below if the code I'm using. Is there an option I'm missing or something else I'm doing wrong? My code is here since apparently I can't post it in this text box without it stripping all formatting! -->http://snipt.org/GnT
Coordinator
Mar 18, 2010 at 9:50 PM

Client-side filtering is not currently supported, though it’s on the wish list.

You will have to filter the results server-side unless you extend the codebase.

Noah

From: cbarr [mailto:notifications@codeplex.com]
Sent: Thursday, March 18, 2010 9:59 AM
To: Noah Heldman
Subject: Filtering results with a local JSON variable? [flexbox:205394]

From: cbarr

Instead of doing an AJAX request for a JSON list of the items to place in my flexbox, I've just got a local JSON object as a variable with all the data in it. This works fine, and it does highlight the matched results, but it *does not* hide results that did not match. Below if the code I'm using. Is there an option I'm missing or somehting else I'm doing wrong? $(function(){ var jsonResults = {"results":[ {"id":"chris","name":"chris@cppartner1.corp","type":"user"}, {"id":"chrisb","name":"chrisb@cppartner1.corp","type":"user"}, {"id":"james","name":"james@cppartner1.corp","type":"user"}, {"id":"testuser1","name":"testuser1@cppartner1.corp","type":"user"}, {"id":"aliens","name":"aliens","type":"group"}, {"id":"authors","name":"authors","type":"group"}, {"id":"blacksmiths","name":"blacksmiths","type":"group"}, ],"total":"7"}; $('#box').flexbox(jsonResults,{ width:300, maxVisibleRows:15, paging:false, resultTemplate:"{name}", noResultsText:"No matching members" }); });

Read the full discussion online.

To add a post to this discussion, reply to this email (flexbox@discussions.codeplex.com)

To start a new discussion for this project, email flexbox@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com