Commit a6ce9192 authored by zhangwenshuai's avatar zhangwenshuai

fix bug

parent 279fe499
......@@ -48,14 +48,6 @@ const DragResized = (props: any) => {
}
newColumns.push(item);
});
// 业务回调
if (typeof onDragResized === 'function') {
onDragResized(newColumns);
}
// table回调
if (typeof onDragResizedCb === 'function') {
onDragResizedCb(newColumns);
}
// 缓存操作
if (cachedFeAttr) {
const cachedCols = getCache({ tableId });
......@@ -67,6 +59,14 @@ const DragResized = (props: any) => {
saveCache({ tableId, data: cachedCols });
}
}
// 业务回调
if (typeof onDragResized === 'function') {
onDragResized(newColumns);
}
// table回调
if (typeof onDragResizedCb === 'function') {
onDragResizedCb(newColumns);
}
};
return (
......
......@@ -187,9 +187,9 @@ const DragSorted = (props: any) => {
if (typeof onDragSorted === 'function') {
onDragSorted(newColumns);
}
// if (typeof onDragSortedCb === 'function') {
// onDragSortedCb(newColumns);
// }
if (typeof onDragSortedCb === 'function') {
onDragSortedCb(newColumns);
}
}, [onDragSortedCb, onDragSorted, columns]);
// 监听鼠标按下
const onMouseDown = useCallback(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment