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

Rerender a row in a table after underlying data model change #102

Open
vsobolmaven opened this issue Apr 5, 2016 · 1 comment
Open

Rerender a row in a table after underlying data model change #102

vsobolmaven opened this issue Apr 5, 2016 · 1 comment

Comments

@vsobolmaven
Copy link

I need to update data for a row externally and have it re-render in the table.

Need something like this:

        var _datatable = document.querySelector('paper-datatable');
        var data = _datatable.get('data');
        var model = data[0];
        model.my_attr = 'New Value';
        // Re-render the row - won't work.
        _datatable.set('data.1', model);              
        // This won't work neither.
        //_datatable.set(['data', index, _datatable.idProperty], 1);

I tried to work through from implementation of _triggerSave() in paper-datatable-card.html, but without any effect. How do I do that properly?

Thanks!

@dhrytsenko
Copy link

dhrytsenko commented Apr 14, 2016

Hi! Try to set right row number: this.$.paperDatatable.set('data.#1.author', 'Tom'); I find it example on docs page Getting started and it help me with a same problem)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants