react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

remove Warning on the table

Open ferchuhill opened this issue 1 year ago • 1 comments

Why


I want to remove this warning: https://github.com/jbetancur/react-data-table-component/issues/1203

VM26934:1 Warning: Received 'true' for a non-boolean attribute 'center'. 
If you want to write it to the DOM, pass a string instead: center="true" or center={value.toString()}.

What


Make some change on the types and where is calling so is passing the like a string.

Example


const columns = [
	{
		name: 'Name',
		selector: row => row.name,
		sortable: true,
		center: true,
	{
];

ferchuhill avatar Jul 02 '24 17:07 ferchuhill

Deploy Preview for react-data-table-component failed.

Name Link
Latest commit 7ca8bb240860cb4ecc035588f83b39c8f61545bf
Latest deploy log https://app.netlify.com/sites/react-data-table-component/deploys/66843c8e7cd35500086b6d4f

netlify[bot] avatar Jul 02 '24 17:07 netlify[bot]

Thank you for the PR, however, I would rather not add code for this as it is preferable IMO to have the user correct this rather than RDT accounting for every case of type coercion

jbetancur avatar Aug 20 '24 11:08 jbetancur

How would this be corrected by the user?

dief avatar Aug 26 '24 15:08 dief

was there any resolution to this? as the columns types expect a boolean, but that seems to be causing the issue

Hazbob avatar Oct 09 '24 11:10 Hazbob