joaocarmo/react-smart-data-table

Not fully compatible with Semantic UI's Pagination component

tisoap opened this issue · 2 comments

Contrary to what the documentation says, react-smart-data-table is not fully compatible with Semantic UI's Pagination component. Passing the default Pagination component directly to the paginator prop yields the following error in the browser console:

Warning: React does not recognize the `perPage` prop on a DOM element. If you
intentionally want it to appear in the DOM as a custom attribute, spell it as
lowercase `perpage` instead. If you accidentally passed it from a parent component,
remove it from the DOM element.

I've created a repository with a runnable example of this error here.

This happens because react-smart-data-table is passing down more props than necessary to the custom paginator component, and by default Semantic UI's Pagination is passing down those props to native DOM elements.

Edit: I opened a PR with a proposed fix.

@tisoap , thank you for your contribution. I've managed to successfully replicate the issue as described and I confirm that there is indeed a problem with passing extra props. Let me give a review and test of the PR #20 before merging into the master branch.

This fix has been merged into the master branch and the changelog file has been updated as well.