Replies: 7 comments
-
I think this is not an issue of alpine, even use that pure javascript will get the same result. |
Beta Was this translation helpful? Give feedback.
-
hmmm is that so? anyway the alpine example give the wrong output (not the same as the doc claim). doc: codepen: thanks for reply tho. |
Beta Was this translation helpful? Give feedback.
-
i think the problem in line 20 and line 23 in $watch.js
currently i am using this on my local build. |
Beta Was this translation helpful? Give feedback.
-
Issue still seems to be present in latest main (08/23/2022 5:52 EST). See CodePen: I think #3046 addresses the issue with additional Cypress tests added. |
Beta Was this translation helpful? Give feedback.
-
This issue has been converted to a discussion as we are now using discussions to track bugs and ideas. |
Beta Was this translation helpful? Give feedback.
-
Issue seems present in v3.12.2: Issue is resolved in: See pull here: Small addition to bundle size, should cover most cases, with additional watch tests to confirm the solution works. |
Beta Was this translation helpful? Give feedback.
-
I'm always still surprised people use $watch. Also, surprised people would actually use the old value for object in any meaningful way.... |
Beta Was this translation helpful? Give feedback.
-
maybe i am doing it wrong.
doing $watch on an array and edit the input value in loop, (console) output the same value between old and new.
code:
https://codepen.io/dinyo/pen/gOvJowE
thank you.
edit: turn out deep watch give wrong oldvalue. even example from documentation are wrong. tested from 3.8 to 3.10
Beta Was this translation helpful? Give feedback.
All reactions