react-data-table-component
react-data-table-component copied to clipboard
Will it be a good option if we invoke onColumnOrderChange after the onDrop event?
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?
columns are reordered onDragEnter; that is when hovering over the target column. Therefore, invoking from onDrop would not reflect what is actually happening
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