Commit a6ce9192 authored by zhangwenshuai's avatar zhangwenshuai

fix bug

parent 279fe499
...@@ -48,14 +48,6 @@ const DragResized = (props: any) => { ...@@ -48,14 +48,6 @@ const DragResized = (props: any) => {
} }
newColumns.push(item); newColumns.push(item);
}); });
// 业务回调
if (typeof onDragResized === 'function') {
onDragResized(newColumns);
}
// table回调
if (typeof onDragResizedCb === 'function') {
onDragResizedCb(newColumns);
}
// 缓存操作 // 缓存操作
if (cachedFeAttr) { if (cachedFeAttr) {
const cachedCols = getCache({ tableId }); const cachedCols = getCache({ tableId });
...@@ -67,6 +59,14 @@ const DragResized = (props: any) => { ...@@ -67,6 +59,14 @@ const DragResized = (props: any) => {
saveCache({ tableId, data: cachedCols }); saveCache({ tableId, data: cachedCols });
} }
} }
// 业务回调
if (typeof onDragResized === 'function') {
onDragResized(newColumns);
}
// table回调
if (typeof onDragResizedCb === 'function') {
onDragResizedCb(newColumns);
}
}; };
return ( return (
......
...@@ -187,9 +187,9 @@ const DragSorted = (props: any) => { ...@@ -187,9 +187,9 @@ const DragSorted = (props: any) => {
if (typeof onDragSorted === 'function') { if (typeof onDragSorted === 'function') {
onDragSorted(newColumns); onDragSorted(newColumns);
} }
// if (typeof onDragSortedCb === 'function') { if (typeof onDragSortedCb === 'function') {
// onDragSortedCb(newColumns); onDragSortedCb(newColumns);
// } }
}, [onDragSortedCb, onDragSorted, columns]); }, [onDragSortedCb, onDragSorted, columns]);
// 监听鼠标按下 // 监听鼠标按下
const onMouseDown = useCallback( 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