material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Is there any way to prevent columns headers horizontal draggable ?

Open nightwolf-041 opened this issue 6 years ago • 3 comments

hi, I use the grouping prop, but because my table direction is RTL, when i move the columns headers together,, it doesn't work properly. so i want to disable horizontal drag and drop for headers... any idea ?

nightwolf-041 avatar Sep 26 '20 13:09 nightwolf-041

Hi,

Maybe setting the draggable prop to false? It is under options. https://material-table.com/#/docs/all-props

kjanos0502 avatar Sep 26 '20 19:09 kjanos0502

You can pass the options prop to your table like this:

options={{
    draggable: false,
    grouping: false,
    sorting: false,
    pageSize: 5,
    actionsColumnIndex: -1
}}

As you can see, one of the options is draggable which takes a Boolean value (true or false)

ditherized avatar Sep 30 '20 15:09 ditherized

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Dec 29 '20 19:12 stale[bot]