[Pkg-javascript-commits] [backbone] 38/281: Fixes #689, documenting the need to resort collections with comparators.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 17:01:54 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.9.0
in repository backbone.

commit d94cfe506c2b42d574a312337f2bfa846e48fe4c
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Sat Oct 29 12:36:23 2011 -0400

    Fixes #689, documenting the need to resort collections with comparators.
---
 index.html | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/index.html b/index.html
index aea293b..6178c13 100644
--- a/index.html
+++ b/index.html
@@ -1275,6 +1275,12 @@ alert(chapters.pluck('title'));
       "sort", which must return <tt>0</tt>, <tt>1</tt>, or <tt>-1</tt>,
       and is more similar to a <tt>sortBy</tt> — a much nicer API.
     </p>
+    
+    <p class="warning">
+      Collections with comparator functions will not automatically re-sort if you 
+      later change model attributes, so you may wish to call <tt>sort</tt> after 
+      changing model attributes that would affect the order.
+    </p>
 
     <p id="Collection-sort">
       <b class="header">sort</b><code>collection.sort([options])</code>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git



More information about the Pkg-javascript-commits mailing list