Permalink
Browse files

feat: 优化子表获取字段逻辑,没有当前行的情况下获取第一行

  • Loading branch information...
LiuYueKai committed Mar 14, 2017
1 parent 06cf24c commit f077032542d9a20556ea18609f25804090df48cd
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/row-util.js
View
@@ -122,9 +122,11 @@ const _findField = function(rowObj, fieldName) {
tempField = tempField[fnames[i]];
if (tempField.value instanceof DataTable) {
var row = tempField.value.getCurrentRow();
- if (row) {
- tempField = row.data;
+ if (!row) {
+ row = tempField.value.rows()[0]
}
+ if (row)
+ tempField = row.data;
}
if (!tempField) {
break;

0 comments on commit f077032

Please sign in to comment.