Skip to content

Commit

Permalink
对于获取被选中行信息的修改
Browse files Browse the repository at this point in the history
在data里面就没有存储过rowId或者id,所以除了在选择标题行时,返回的congfig是唯一的,其余行config返回的rowId均为undefined,所以改为直接判断rowIndex从而赋值给congif.rowId即可
  • Loading branch information
zora-han authored Jan 10, 2018
1 parent d7ae472 commit 5edddae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dist/lib/datagrid/zui.datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,7 @@
}
var dataItem = rowIndex > 0 ? that.getDataItem(rowIndex - 1) : null;
config.data = dataItem;
config.rowId = dataItem ? (dataItem.rowId || dataItem.id) : (rowIndex === 0 ? '#header' : rowIndex);
config.rowId = rowIndex === 0 ? '#header' : rowIndex;
return config;
};

Expand Down

0 comments on commit 5edddae

Please sign in to comment.