Permalink
Browse files

fix: getSimpleData返回值应该和传入值保持一致

  • Loading branch information...
liuyk
liuyk committed Dec 5, 2016
1 parent aba9594 commit e981df40b4991c244ee4cf15751dcbe814e014a5
Showing with 6 additions and 1 deletion.
  1. +3 −0 js/dataTable/getSimpleData.js
  2. +3 −1 js/dataTable/simpleData.js
@@ -28,6 +28,9 @@ const getSimpleData = function(options){
for(var i = 0; i< rows.length; i++){
_rowData.push(rows[i].getSimpleData({fields:fields}));
}
if(_rowData.length == 0){
_rowData = this.setSimpleDataReal; //云采提的#需求
}
return _rowData;
};
@@ -15,8 +15,10 @@ const setSimpleData = function(data,options){
this.cachedPages = [];
this.focusIndex(-1);
this.selectedIndices([]);
this.setSimpleDataReal = [];
if (!data){
this.setSimpleDataReal = data;
// throw new Error("dataTable.setSimpleData param can't be null!");
return;
}

0 comments on commit e981df4

Please sign in to comment.