walmartlabs/thorax — pull request #8 by jhudson8 (2011-12-20 16:30:26+00:00)
Title: Flexible item appender

add flexible item appenders. current behavior seems fixed to top-down

There is an index parameter that is an optional paramter to appendItem but it is not used when appendItem is called from the collection add (the current impl has index determined inside of appendItem - even if the passed index is 0).

Outside of that, the renderCollection was calling them in order so you previously didn't have the ability to just override appendItem to change behavior as that would only work for dynamically added items - not items that were already in the collection when the view was rendered.

I do understand that you could add a comparator to the collection to change the order they are retrieved - but what if there is a single cache with different views? Should the collection order be tied to the way that the DOM elements appear?