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

added accessor to data-columns as a way to access nested data values #123

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

christophe-g
Copy link

Allow - without defining new templates - to handle cases where data is of the form:

{
  "key": 0,
  "value": {
     "count": 10,
     "avg": 11
  }
}

in this case we would have a countAccessor like:

var countAccessor = function(d) {return d.value.count;}

and

 <paper-datatable-column header="Count"  accessor="[[countAccessor]]" type="Number"></paper-datatable-column>

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

Successfully merging this pull request may close these issues.

1 participant