tleunen / react-mdl

React Components for Material Design Lite
https://tleunen.github.io/react-mdl/
MIT License
1.76k stars 254 forks source link

Fix react warning: Unknown prop `selectedRows` #499

Closed sanyatuning closed 7 years ago

sanyatuning commented 7 years ago

Warning: Unknown prop selectedRows on

tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop in table (created by Table) in Table (created by Selectable) in Selectable (created by Sortable)

codecov-io commented 7 years ago

Codecov Report

Merging #499 into master will increase coverage by <.01%. The diff coverage is 100%.

Impacted Files Coverage Δ
src/DataTable/Selectable.js 94.82% <100%> (+0.09%) :arrow_up:
sanyatuning commented 7 years ago

That's true.

@tleunen requested changes on this pull request.

In src/DataTable/Selectable.js https://github.com/react-mdl/react-mdl/pull/499#discussion_r138122796:

@@ -128,6 +128,7 @@ export default Component => { // remove unwatned props // see https://github.com/Hacker0x01/react-datepicker/issues/517#issuecomment-230171426 delete otherProps.onSelectionChanged;

  • delete otherProps.selectedProps;

Shouldn't it be selectedRows instead?

sanyatuning commented 7 years ago

sorry for the slow fix :)