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.03k stars 409 forks source link

remove Warning on the table #1239

Closed ferchuhill closed 1 week ago

ferchuhill commented 2 months ago

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,
    {
];
netlify[bot] commented 2 months ago

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
jbetancur commented 1 week ago

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

dief commented 1 week ago

How would this be corrected by the user?