I would like to disable the reorder feature on dataTable component.
So i try to use the reorder property on all the columns available inside the dataTable.
When i clicked on the header of the column the property is correctly applied but I'm able to reorder the cells themselves.
So the property does no apply to the cells.
To Reproduce
Steps to reproduce the behavior:
Go to '...'
Click on '....'
Scroll down to '....'
See error
Expected behavior
A clear and concise description of what you expected to happen.
Code Sandbox, Screenshots, or Relevant Code
Please include a codesandbox to help expedite troublshooting.
Issue Check list
styled-components
Sample of the code
'use client'; import Image from 'next/image' import styles from './page.module.css' import DataTable from 'react-data-table-component'
export default function Home() {
const columns=[ { name:'Title', reorder:false, sortable:false, selectableRows:false, selector:row => row.title }, { name:'Description', reorder:false, sortable:false, selectableRows:false, selector:row => row.description } ];
const data=[ { id:1, title:'Title 1', description: 'Description 1' }, { id:2, title:'Title 2', description: 'Description 2' } ];
return ( <DataTable columns={columns} data={data} onColumnOrderChange={cols => console.log(cols)}
) }
Describe the bug
I would like to disable the reorder feature on dataTable component. So i try to use the reorder property on all the columns available inside the dataTable.
When i clicked on the header of the column the property is correctly applied but I'm able to reorder the cells themselves. So the property does no apply to the cells.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Code Sandbox, Screenshots, or Relevant Code
Please include a codesandbox to help expedite troublshooting.
https://codesandbox.io/embed/react-data-table-sandbox-ccyuu
Otherwise, add screenshots and/or complete sample code to help explain your problem.
Versions (please complete the following information)