未设置key的容错

This commit is contained in:
yangchch6 2020-02-28 20:57:09 +08:00
parent 7ed1cd7693
commit 910c10469d
4 changed files with 13 additions and 4 deletions

View File

@ -563,7 +563,10 @@ var _initialiseProps = function _initialiseProps() {
});
}
}
// console.log("currentIndex :",currentIndex);
if (currentIndex < 0) {
console.log('Key must be set for column!');
return;
}
var currentObj = _this7.table.cols[currentIndex];
_this7.drag.currIndex = currentIndex;
_this7.drag.oldLeft = event.x;

5
dist/demo.js vendored
View File

@ -52188,7 +52188,10 @@
});
}
}
// console.log("currentIndex :",currentIndex);
if (currentIndex < 0) {
console.log('Key must be set for column!');
return;
}
var currentObj = _this7.table.cols[currentIndex];
_this7.drag.currIndex = currentIndex;
_this7.drag.oldLeft = event.x;

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -234,7 +234,10 @@ class TableHeader extends Component {
currentIndex = columnsChildrenList.findIndex(da=> (da.key && da.key.toLowerCase()) === columnKey.toLowerCase());
}
}
// console.log("currentIndex :",currentIndex);
if(currentIndex < 0){
console.log('Key must be set for column!')
return;
}
let currentObj = this.table.cols[currentIndex];
this.drag.currIndex = currentIndex;
this.drag.oldLeft = event.x;