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

paper-datatable implementation #23

Open
thisbounty opened this issue Jul 5, 2017 · 1 comment
Open

paper-datatable implementation #23

thisbounty opened this issue Jul 5, 2017 · 1 comment

Comments

@thisbounty
Copy link

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

@jscissr
Copy link
Owner

jscissr commented Jul 10, 2017

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>

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