react-data-table-component icon indicating copy to clipboard operation
react-data-table-component copied to clipboard

Will it be a good option if we invoke onColumnOrderChange after the onDrop event?

Open vocads-bot opened this issue 3 years ago • 2 comments

onColumnOrderChange is triggered eachtime when a column is dragged and moved. For instance, I have five columns. A, B, C, D, E and I want to reorder columns as B, C, D, E, A, as I start dragging and as soon as A is interchanged with B the function is invoked, similarly it is invoked for every column till we reach E. Will it be a good option if onColumnOrderChange is invoked after the onDrop event?

Can you please share your thoughts?

vocads-bot avatar Sep 16 '21 17:09 vocads-bot

columns are reordered onDragEnter; that is when hovering over the target column. Therefore, invoking from onDrop would not reflect what is actually happening

jbetancur avatar Sep 19 '21 16:09 jbetancur

Sorry, I think I see what you are asking. We would need to add new call backs for different stages in the drag drop process. eg onDragDrop. This can be a feature request to do so but I can't give you a timeline at the moment.

Probably something like

onColumnDragDrop and so on...

This is probably too not much work that would be open for a PR

jbetancur avatar Sep 19 '21 16:09 jbetancur