2.0.4 Live @index still not working correctly #640

Closed
AdamTourkow opened this Issue Jan 3, 2014 · 7 comments

Comments

Projects
None yet
2 participants
@AdamTourkow

There was a pending fix to live binding in commit:
cb849f3

While waiting for the fix to reach release I hand modified the changes into my js which worked:
http://subsonic-systems.com/misc/can.custom_modifed_by_me.js
Modifed 2.0.3 code: http://jsfiddle.net/subsonic/6v6nz/

When using the 2.0.4 code, it still doesn't work.
Current 2.0.4 code: http://jsfiddle.net/subsonic/j9ZBw/

Steps to reproduce:

Expected:
When deleting first element/node index should be deleted correctly.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 4, 2014

Contributor

By "it" you mean some other case than the one tested in cb849f3 ?

Contributor

justinbmeyer commented Jan 4, 2014

By "it" you mean some other case than the one tested in cb849f3 ?

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 4, 2014

Contributor

This seems to be related to using partials:

http://jsfiddle.net/j9ZBw/5/

Contributor

justinbmeyer commented Jan 4, 2014

This seems to be related to using partials:

http://jsfiddle.net/j9ZBw/5/

@AdamTourkow

This comment has been minimized.

Show comment
Hide comment
@AdamTourkow

AdamTourkow Jan 4, 2014

By "it", I mean: "Index: 0 Parent: | Item 0"

That one doesn't delete, and then all the indexes above it decrement.

Not to mention, it worked when I just applied that one patch as can be seen in http://jsfiddle.net/subsonic/6v6nz/

By "it", I mean: "Index: 0 Parent: | Item 0"

That one doesn't delete, and then all the indexes above it decrement.

Not to mention, it worked when I just applied that one patch as can be seen in http://jsfiddle.net/subsonic/6v6nz/

@ghost ghost assigned justinbmeyer Jan 6, 2014

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 6, 2014

Contributor

@AdamTourkow After looking at this fiddle for a bit, I hope this is just an example and your code does not work like this. Items should not be capitalized, plus it's a map.

Contributor

justinbmeyer commented Jan 6, 2014

@AdamTourkow After looking at this fiddle for a bit, I hope this is just an example and your code does not work like this. Items should not be capitalized, plus it's a map.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 6, 2014

Contributor

Here's a minimal breaking example: http://jsfiddle.net/j9ZBw/7/

Contributor

justinbmeyer commented Jan 6, 2014

Here's a minimal breaking example: http://jsfiddle.net/j9ZBw/7/

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 6, 2014

Contributor

It seems there is a difference between how the partial is found. http://jsfiddle.net/j9ZBw/9/ breaks, but if you change:

{{>anitem}}

to

{{>itempartial}}

It works. My bet is that this is due to a bug with renderer functions not actually being renderer functions.

Contributor

justinbmeyer commented Jan 6, 2014

It seems there is a difference between how the partial is found. http://jsfiddle.net/j9ZBw/9/ breaks, but if you change:

{{>anitem}}

to

{{>itempartial}}

It works. My bet is that this is due to a bug with renderer functions not actually being renderer functions.

@justinbmeyer

This comment has been minimized.

Show comment
Hide comment
@justinbmeyer

justinbmeyer Jan 6, 2014

Contributor

Nope, seems to be due to to reading a partial in can.view.render.txt being "compute-itized" ....

Contributor

justinbmeyer commented Jan 6, 2014

Nope, seems to be due to to reading a partial in can.view.render.txt being "compute-itized" ....

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