0

I have successfully implemented the FuelUx tree control but I want the user to click a different status check mark (IE active or archived) and only display the child items in the tree that contain the selected status.

Any suggestions on how to implement this feature?

Thanks, Greg

Greg Svitak
  • 485
  • 1
  • 6
  • 19

1 Answers1

0

My first inclination would be to add an active/inactive/archived/whatever class to the data source attr.cssClass key.

http://getfuelux.com/javascript.html#tree-usage-datasource

This would allow you to toggle which item state is being displayed at a given time. You could also use styles connected to the class to customize the icon based on the state.

  • Thanks for the suggestion. I ended up using a MVVC framework and bound all of the FuelUX tree-items that we in the open state to a Knockout observable array. I then filtered the array based on the check mark and changed the visible data-binding to display/not display the tree-item. var available_items =($("[document]")); ko.utils.arrayForEach(available_documents, function (doc) { if (doc) { observable.push(doc); } }); – Greg Svitak Oct 27 '14 at 18:06