You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using push to add objects to an array hooked up to a template element which contains form inputs, it appears that newly-created input elements are not bound in the same way as input elements created based on the initial data object provided when instantiating the Vue instance.
The newly-created input elements have the correct value after push is called, but typing in them doesn't cause a property computed on the array to change.
This commit has a functional test which demonstrates this:
A computed property can depend on properties on repeated items.
When new items are added to the Array, the dependency collection
has already been done so their properties are not collected by the
computed property on the parent. We need to re-parse the dependencies
in such situation, namely push, unshift, splice and when the entire
Array is swapped.
Also included casper test case by @daines.
Thanks for reporting this! Fixed in a7dfb3f (see commit message for a detailed explanation)
The casper test case passes because you changed all three fields in the same event loop, so when the view is updated on next tick it's using the latest values. If you change the 3rd field alone the test will fail. I have modified your test case to account for this and included it in the commit.
* vuejs#65 - add sassOptions for docs
fix docs with error: 'options has an unknown property 'indentedSyntax'.'
which new sass-loader are writen in 'sassOptions';
This should also cause quick prototyping's sass setting, after executing '$vue serve'
* vuejs#65 - sassOptions fix for sass-loader
* vuejs#65 - fix sassOptions - lang:ru
* add comment for sassOptions version
* add comment for sassOptions
* add comment for sassOptions
* Update docs/guide/pre-processors.md
Co-Authored-By: Haoqun Jiang <[email protected]>
* Update pre-processors.md
* Update pre-processors.md
When using
push
to add objects to an array hooked up to a template element which contains form inputs, it appears that newly-created input elements are not bound in the same way as input elements created based on the initial data object provided when instantiating the Vue instance.The newly-created input elements have the correct value after
push
is called, but typing in them doesn't cause a property computed on the array to change.This commit has a functional test which demonstrates this:
daines@b5ec549
Strangely, this test passes when run with casper but fails in the browser. (I've tried Safari, Chrome, and Firefox.)
The text was updated successfully, but these errors were encountered: