jbetancur / react-data-table-component

A responsive table library with built-in sorting, pagination, selection, expandable rows, and customizable styling.
https://react-data-table-component.netlify.app
Apache License 2.0
2.04k stars 411 forks source link

Fix unrecognized prop errors in React #1154

Closed HendrikPetertje closed 1 year ago

HendrikPetertje commented 1 year ago

React does not like receiving object props that don't match any HTML spec. Styled components is dealing with this problem by prefixing all non-standard properties one might want to send in with dollar signs as $transientProps

You can read more about it here: https://styled-components.com/docs/api#transient-props

This fix gets rid of these kind of errors (that the test suite in my project is tripping over since we updated react and styled-components): image

netlify[bot] commented 1 year ago

Deploy Preview for react-data-table-component ready!

Name Link
Latest commit 6dfc3528a6afb37edb3e4612d963f65d68e50f54
Latest deploy log https://app.netlify.com/sites/react-data-table-component/deploys/64db45cfaceaef0008fc0de3
Deploy Preview https://deploy-preview-1154--react-data-table-component.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

HendrikPetertje commented 1 year ago

wow that's really fancy, deploying everything to a storybook and all! hats off on that one!

medram commented 1 year ago

I'm having many errors on the browser console too for the same cause reason, please fixed soon :D.

loursbourg commented 1 year ago

The changes made in this PR has definitely brought some improvements, the browser console is showing warnings related to incorrect prop naming. For instance:

Warning: Received `true` for a non-boolean attribute `responsive`.

and

Warning: React does not recognize the `fixedHeader` prop on a DOM element

Those errors are really cluttering the console. Please, merge.

loursbourg commented 1 year ago

Seems like this package is no longer maintained…

jessewriter commented 1 year ago

is there a way to hide these warnings until this is merged? makes my console a mess. thanks for the update Hendrik

jessewriter commented 1 year ago

this seems like good advice on how to consume the prop and not pass it forward https://legacy.reactjs.org/warnings/unknown-prop.html

medram commented 1 year ago

it's been a year and this repo/project is frozen, please can anyone fork this repo and keep the project going/updated?

oancius commented 1 year ago

@jessewriter Thanks for reviewing this PR! Do you know if it will be merged and a new version will be released soon?

jessewriter commented 1 year ago

@oancius i have no read write authority on this repo. i did pull this commit down locally and published to our company artifactory and it is an improvement with many less warnings. I created a PR off of this fixing the remaining warnings. Unfortunately i did not fix the jest tests so build fails ugh :/ (work in progress) so we might be on our own here to create our own artifact with the fix

oancius commented 1 year ago

@oancius i have no read write authority on this repo. i did pull this commit down locally and published to our company artifactory and it is an improvement with many less warnings. I created a PR off of this fixing the remaining warnings. Unfortunately i did not fix the jest tests so build fails ugh :/ (work in progress) so we might be on our own here to create our own artifact with the fix

got it! thanks for the quick reply tho! 🙌🏼

HendrikPetertje commented 1 year ago

I don't really have the bandwidth myself to become the sole maintainer for this plugin and I can not guarantee that I'll be working with react for the next 10 years either :), but I'll give it a try I guess, becuase I need this plugin for a bunch of different projects.

So, I'll reach out to @jbetancur (the original maintainer) and:

@jessewriter, once published, I would love to know what other fixes you guys have applied in your own artifactory, I'll ping you with the repo address

jbetancur commented 1 year ago

@HendrikPetertje As you, my very limited bandwidth has kept me from maintaining this project as I once did. Managing all the issues and feature asks have become challenging because this project was originally intended to be a simple table library and instead grew to something more comprehensive. I have been struggling to find a co maintainer to help out as there are many needed improvements, refactors, React 18, and bug fixes that need to be made or considered. But in the meantime I am open to having someone else drive for a bit to squash some of the bugs and because the community has come to depend on this project.

jbetancur commented 1 year ago

version 7.5.4 with this has been published

loursbourg commented 1 year ago

version 7.5.4 with this has been published

great, i've been looking forward to this