Skip to content
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

bindings to concrete types not propagating correctly from template to collection #1839

Closed
sjmiles opened this issue Jun 11, 2015 · 4 comments
Assignees
Labels

Comments

@sjmiles
Copy link
Contributor

sjmiles commented Jun 11, 2015

Given:

     <template is="dom-repeat" items="{{somethings}}">
        <paper-input value="{{item}}"></paper-input>
      </template>

changes to paper-input.valueappear in template.getModelForElement(paper-input).item but not in template.items[n].

http://jsbin.com/qocuka/2/edit

@pvmart
Copy link

pvmart commented Jun 12, 2015

Might be related.
Overwriting an object in array with the new one destroys binding.

         this.push('test', {value: 1});
         this.set('test.0.value',  2);
         this.set('test.0',{value: 3});
         this.set('test.0.value',  4);

The result is 3 but in the model is 4.
http://plnkr.co/edit/AH5SKoedUQgeyfBgsfWL?p=preview

@kevinpschaaf
Copy link
Member

@pvmart Yep, they are the same root cause. A fix is in the works that should solve both this and #1854.

@kevinpschaaf
Copy link
Member

This should be fixed by PR #1855.

Confirmed it fixes repro case here:
http://jsbin.com/ziseru/2/edit

@kevinpschaaf
Copy link
Member

Root cause here w.r.t. notifying based on individual dom-repeat instances' item changng was fixed in #1854.

Note related issue opened here: #1913, regarding problems when primitive values are duplicated in the array.

kevinpschaaf added a commit that referenced this issue Jun 22, 2015
- Fixes bug in previous fix for #1839/#1854 where notifying properties would not notify during configuration
- renames `_setPropertyQuiet` to `_setProperty` with `quiet` arg
- renames `_propertySet` to `_propertySetter` for clarity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants