Commit 5271f1d3 by zhaochengxiang

nothing

parent 1274596f
...@@ -445,8 +445,8 @@ const UpdateField = (props) => { ...@@ -445,8 +445,8 @@ const UpdateField = (props) => {
const moveRow = useCallback( const moveRow = useCallback(
(dragIndex, hoverIndex) => { (dragIndex, hoverIndex) => {
const dragRow = data[dragIndex]; const dragRow = dataRef.current[dragIndex];
const newData = update(data, { const newData = update(dataRef.current, {
$splice: [ $splice: [
[dragIndex, 1], [dragIndex, 1],
[hoverIndex, 0, dragRow], [hoverIndex, 0, dragRow],
...@@ -457,7 +457,7 @@ const UpdateField = (props) => { ...@@ -457,7 +457,7 @@ const UpdateField = (props) => {
dataRef.current = newData; dataRef.current = newData;
onChange && onChange(newData); onChange && onChange(newData);
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [data]); }, []);
const onTableRow = (record, index) => { const onTableRow = (record, index) => {
let rowParams = { let rowParams = {
......
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