glittershark / reactable

Fast, flexible, and simple data tables in React
glittershark.github.io/reactable
MIT License
1.51k stars 222 forks source link

React v15 complains about props being passed to native <table> element #291

Closed dcurletti closed 8 years ago

dcurletti commented 8 years ago

As soon as I upgraded to React v15 I started getting this error:

clients___realscout

Which I can only assume is because of this line: https://github.com/glittershark/reactable/blob/6da047162b8bfe37dde79ebe91190d974ccb79c5/src/reactable/table.jsx#L503

vdh commented 8 years ago

This was a new warning added in v15.2 if I'm not mistaken.

nic commented 8 years ago

This is new at v15.2: 3 days ago: https://gist.github.com/jimfb/d99e0678e9da715ccf6454961ef04d1b

dcurletti commented 8 years ago

Yea, I should have been more explicit in my initial post: I think it is a bit risky to pass the rest of the props to the native table element, especially only being filtered by a small blacklist. I think a whitelist would be more appropriate, taken from here: http://www.w3schools.com/tags/tag_table.asp . The table doesn't even have that many unique attributes.

vdh commented 8 years ago

@dcurletti The blacklist in filterPropsFrom is recycled between all the other tags as well, so to replace it with a whitelist you'd probably need to create different whitelists per tag.

I took a shot with #293 at expanding the blacklist with as many props as I could find.

hassankhan commented 8 years ago

Just for everyone's attention, still getting the same errors with React v15.3, too

vdh commented 8 years ago

@hassankhan Are you using master? Because the fix hasn't been put into a release yet.

hassankhan commented 8 years ago

Yep, I noticed that so I opened #305 😄

dcurletti commented 8 years ago

Gracias.