Closed Mytia closed 7 years ago
Thanks for calling this out, but I would love to be able to reproduce your problem, so I can investigate whether a better solution is needed. Can you provide a small sample which shows the problem? (Maybe create a jsfiddle.) It may be the issue is already fixed in the update I will shortly be publishing...
Thank you...
There are many cases of "inner data-binding elements removed by top data-binding changes" - such as in the sample http://www.jsviews.com/#samples/editable/toplevel-for, but without incurring the error you describe. So your error may be due to somethings else in your code or template which is leading to the problem.
Without an example showing your issue, I can't investigate further... Let me know how you get on producing a repro sample... Thanks!
Deleting a movie in http://www.jsviews.com/#samples/editable/toplevel-for gives exactly the same stack trace as in your screenshot, but with no error.
I have attached the planned update (for commit 86). You could test in your environment if the bug occurs still with this update. (Change the extension back to .js).
If not, then we can close this issue. But if the bug does still occur, then I can try to modify the update with an appropriate fix - but only if I can have a repro sample showing the problem - since in most scenarios there has been no issue. It could be there is a bug in your code. With a repro sample I can try to identify what that bug might be due to...
That said, I am hoping to publish commit 86 very soon, so a quick reply would be great. If not it may have to wait till commit 87 at a later date...
Hello, sorry for the long answer, was offline ... I was able to reproduce the bug, although it was not easy, and not came from "top data-binding changes" as I said first. I was thinking so because array was refreshing from top data-binding changes. https://jsfiddle.net/nq4372t8/3/ As far as I understand it occurs in the case of a combination of checking #data ({{if #data}}) and sequential updating of the array, first to another array that contains at least one element from the previous one, but necessarily at another position, and then to an empty array.
Perhaps it can be reproduced with a simpler way...
Excellent. That's just what I needed to investigate. Working on it now...
The test sample was perfect for my needs.
I have a fix ready for the next update. Here it is if you want to try it in your environment:
Thanks, It's working.
But, have some problems in tags with new version:
Thanks for testing and calling out those issues. It's very helpful.
Here is an update which addresses your -2 and -3:
For your issue -1, yes - that is a breaking change - it is renamed to updateValue() (and there is also an upateValues() method, to be used if there are multiple bindTo parameters). See the attached commit notes that I plan to provide:
Let me know if you see any other problems. The update is an important one, with a number of improvements, so there could be something else that I have missed...
Thanks, it seems now all began to work fine, while I can't find something not working:)
If you do find something, let me know :). Here is an update with one small change:
This may be the version I'll use for the next update...
The issues discussed have been resolved by commit 86. I'll close this issue now. (Please re-open or comment if you find further issues. Thanks!)
Hi, get this error when inner data-binding elements removed by top data-binding changes: