New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort plugin excludes batchNum; Maybe fires unnecessary events #1707

Closed
akagomez opened this Issue May 22, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@akagomez
Contributor

akagomez commented May 22, 2015

can.batch.start();
listB.push({ id: 'a' });
listB.push({ id: 'a' });
listB.push({ id: 'a' });
can.batch.stop();
"// BATCHED; SORTED..."
"    Sorted..." // <-- Upon creating the list
"    Sorted..." 
["type:", "length", "batchNum:", undefined]
["type:", "length", "batchNum:", 9] // <-- This event caused the sort
"    Swapped? 1, 2"
["type:", "length", "batchNum:", undefined]
["type:", "length", "batchNum:", 9] // <-- This event caused the swap
["type:", "length", "batchNum:", 9]

The Sort plugin fires events like length, add, reset, etc. for can.view.live.list and does nothing to pass along the original batchNum that instigated the work.

Since the current Sort plugin is derived from the previously incomplete Sort plugin, those events were left in/adapted. I'm curious to know if we can do without them all together.

http://jsbin.com/poduxa/6/edit?js,console

@daffl

This comment has been minimized.

Show comment
Hide comment
@daffl

daffl Oct 22, 2015

Contributor

Closed via #1718

Contributor

daffl commented Oct 22, 2015

Closed via #1718

@daffl daffl closed this Oct 22, 2015

@daffl daffl added this to the 2.3.0 milestone Oct 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment