소스 검색

Table: changing current-row-key when current-row-key is assigned to null (#11866)

Jikkai Xiao 7 년 전
부모
커밋
45241cbaa8
1개의 변경된 파일1개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 3
      packages/table/src/table-store.js

+ 1 - 3
packages/table/src/table-store.js

@@ -587,9 +587,7 @@ TableStore.prototype.setCurrentRowKey = function(key) {
   const data = states.data || [];
   const keysMap = getKeysMap(data, rowKey);
   const info = keysMap[key];
-  if (info) {
-    states.currentRow = info.row;
-  }
+  states.currentRow = info ? info.row : null;
 };
 
 TableStore.prototype.updateCurrentRow = function() {