Hey Andrei,

Andrei a écrit :
> Is there a way to make a sortable aware of new items, without
> destroying and recreating the sortable ?

Not that I know of, and the source code, er... concurs :-)

Actually, manually going into the details of registering stuff with
sortable would:

- create a coupling to undocumented, mostly internal, workings.  This
could very well mean code break down the road, as spinoffs code is a bit
volatile

- end up with such a minor improvement in performance, if any, that it
would prove pretty useless.

BESIDES, you DO need to unregister all internal droppables when you're
about to replace the list.  It's a mandatory requirement when using
draggables/droppables: if you remove such elements from the DOM,
unregister them first.  Sortable.destroy takes proper care of that for you.

-- 
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---

Reply via email to