fix: 排序时data 为空处理
This commit is contained in:
parent
a5d86534be
commit
4ec5557598
|
@ -158,7 +158,7 @@ export default function sort(Table, Icon) {
|
||||||
* 多列排序 先排order为1的,其他的基于已排序的数据排
|
* 多列排序 先排order为1的,其他的基于已排序的数据排
|
||||||
*/
|
*/
|
||||||
multiSort = columns => {
|
multiSort = columns => {
|
||||||
let { data, oldData } = this.state;
|
let { data, oldData=[] } = this.state;
|
||||||
const self = this;
|
const self = this;
|
||||||
let orderCols = {},
|
let orderCols = {},
|
||||||
orderColslen = 0;
|
orderColslen = 0;
|
||||||
|
@ -180,7 +180,7 @@ export default function sort(Table, Icon) {
|
||||||
};
|
};
|
||||||
|
|
||||||
toggleSortOrder = (order, column) => {
|
toggleSortOrder = (order, column) => {
|
||||||
let { data, oldData, flatColumns } = this.state;
|
let { data, oldData = [], flatColumns } = this.state;
|
||||||
let { sort } = this.props;
|
let { sort } = this.props;
|
||||||
let seleObj;
|
let seleObj;
|
||||||
if (!oldData) {
|
if (!oldData) {
|
||||||
|
|
Loading…
Reference in New Issue