Any way to prevent the user from moving the columns around?
I checked the code the other day, and there doesn't seem to be one. It should be fairly simple to implement.
There is a react-beautiful-dnd component that is inserted into each header cell. With an additional parameter in props.options, this could be changed to use a simple div
Thanks, I will take a look later and create a PR if there is no objections to adding such a feature.
I thought being able to drag the columns was a feature. I find it cool.
I also like the feature. But I think it can get in the way of some functionality and custom components. IMO, it would therefore be appropriate to make it optional, or ideally opt-out.
In my use case I am rendering a second row in the header with controls that control some column properties, and am using a fixed layout with computed widths. Moving columns around in that scenario is not pretty.
@xiaomaini Please do implement this as it is not always desirable to have some columns be draggable.
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.
Most helpful comment
@xiaomaini Please do implement this as it is not always desirable to have some columns be draggable.