Skip to content

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

Description

@sjmiles

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

Activity

  1. pvmart commented on Jun 12, 2015

    @pvmart

    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

  2. kevinpschaaf commented on Jun 12, 2015

    @kevinpschaaf
    Member

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

  3. kevinpschaaf commented on Jun 12, 2015

    @kevinpschaaf
    Member

    This should be fixed by PR #1855.

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

  4. kevinpschaaf commented on Jun 19, 2015

    @kevinpschaaf
    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.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions