fix:2.1.3版本的修改回退,实现有问题

This commit is contained in:
yangchch6 2019-10-21 17:15:39 +08:00
parent 9a649290b1
commit 05c88bcf5a
4 changed files with 4 additions and 10 deletions

View File

@ -144,9 +144,7 @@ var Tree = function (_React$Component) {
var startIndex = this.startIndex,
endIndex = this.endIndex;
var expandAll = nextProps.defaultExpandAll;
var syncData = nextProps.loadData;
var expandedKeys = this.getDefaultExpandedKeys(nextProps, syncData || expandAll);
var expandedKeys = this.getDefaultExpandedKeys(nextProps, true);
var checkedKeys = this.getDefaultCheckedKeys(nextProps, true);
var selectedKeys = this.getDefaultSelectedKeys(nextProps, true);
var st = {};

4
dist/demo.js vendored
View File

@ -34384,9 +34384,7 @@
var startIndex = this.startIndex,
endIndex = this.endIndex;
var expandAll = nextProps.defaultExpandAll;
var syncData = nextProps.loadData;
var expandedKeys = this.getDefaultExpandedKeys(nextProps, syncData || expandAll);
var expandedKeys = this.getDefaultExpandedKeys(nextProps, true);
var checkedKeys = this.getDefaultCheckedKeys(nextProps, true);
var selectedKeys = this.getDefaultSelectedKeys(nextProps, true);
var st = {};

2
dist/demo.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -90,9 +90,7 @@ class Tree extends React.Component {
componentWillReceiveProps(nextProps) {
const {startIndex,endIndex} = this;
let expandAll = nextProps.defaultExpandAll;
let syncData = nextProps.loadData;
const expandedKeys = this.getDefaultExpandedKeys(nextProps, syncData || expandAll);
const expandedKeys = this.getDefaultExpandedKeys(nextProps, true);
const checkedKeys = this.getDefaultCheckedKeys(nextProps, true);
const selectedKeys = this.getDefaultSelectedKeys(nextProps, true);
const st = {};