Skip to content

Comments

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

Open
christophe-g wants to merge 8 commits intoDavid-Mulder:masterfrom
PolymerEl:accessorFn
Open

added accessor to data-columns as a way to access nested data values#123
christophe-g wants to merge 8 commits intoDavid-Mulder:masterfrom
PolymerEl:accessorFn

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