Re-rendering the entire collection view is a bit brute force and causes an excessive number of reflows. Fortunately our browsers are fast and it is hard to notice, but large collections have a serious performance impact and meta state (like selected text) is lost between sorts.
Instead of re-rendering all elements it would be extra cool to calculate the new positions and only re-render those which have moved.
Re-rendering the entire collection view is a bit brute force and causes an excessive number of reflows. Fortunately our browsers are fast and it is hard to notice, but large collections have a serious performance impact and meta state (like selected text) is lost between sorts.
Instead of re-rendering all elements it would be extra cool to calculate the new positions and only re-render those which have moved.