Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to disable drag and drop for Material-Table?

Everything in Material-Table is working good, but I cant find the props / option to disable Drag and Drop for columns headings. I just need it to stay the same as it is provided in code

This is how my columns and options props look like :

columns={[
  {title: 'Name', field: 'name', defaultSort: 'asc'},
  {title: 'Code', field: 'code'},
  {title: 'Type', field: 'type.value'},
  {title: 'Regions', field: 'regions', sorting: false},
  {title: 'Currency', field: 'currencyCode'},
]},
options={{
  showTitle: false,
  actionsColumnIndex: -1
}}
like image 817
Vra3 Avatar asked Jan 18 '26 13:01

Vra3


1 Answers

You should set draggable option to false

options={{
  draggable: false,
}}

As a result you wont also be able to use grouping option anymore

like image 93
Amir Keramat Avatar answered Jan 21 '26 04:01

Amir Keramat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!