react-polymer
react-polymer copied to clipboard
paper-datatable implementation
I'm trying to add paper-datatable, and I'm running into an error with dataHost. My issue is detailed here:
https://stackoverflow.com/questions/44916580/add-paper-datatable-to-react-polymer-demo
One problem is that React uses attributes instead of properties for custom elements. Attributes are just strings, but you need an array of objects. You can work around this by using ref. Try this (not tested):
const data = [
{id: 0, title: 'Frozen yogurt', ...},
{id: 1, title: 'Ice cream sandwich', ...}
]
<paper-datatable ref={ref => ref && ref.data = data} selectable multi-selection>
...
</paper-datatable>