Closed klihelp closed 9 years ago
Showing a filtered data set is straightforward. The way it's done is by simply sending a new filtered array as input. A simple example might be...
var input = [ objectsHere ];
tremula.refreshData(input,optionalDataAdapter); //TremulaJS paints stuff to screen
//user interacts with someFilteringParameters
var filteredInput = someFilteringMethod(input,someFilteringParameters)
tremula.refreshData(filteredInput,optionalDataAdapter); //TremulaJS paints new stuff screen
TremulaJS paints stuff to screen very very quickly (depending on array size within 50ms) so updating your data set in this way can feel very natural/persistent.
Optionally, you can also call tremula.grid.jumpObjTo(0,objectRefOrIndex);
afterward to move your list to a particular scroll point to maintain UX context if necessary.
Hope this helps!
Thank you, seems very easy:)
Is there a way to filter the content?
I see on art.com integrated price, color, size filtering.