fix: autoExpandParent 未生效问题
This commit is contained in:
parent
ae18db0834
commit
046a7ae8eb
|
@ -172,8 +172,7 @@ var Tree = function (_React$Component) {
|
|||
return !prevProps && name in nextProps || prevProps && prevProps[name] !== nextProps[name];
|
||||
}
|
||||
// ================ expandedKeys =================
|
||||
// if (needSync('expandedKeys') || (prevProps && needSync('autoExpandParent'))) {
|
||||
if (needSync('expandedKeys')) {
|
||||
if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent') || prevProps && prevProps['expandedKeys'] !== expandedKeys) {
|
||||
st.expandedKeys = expandedKeys;
|
||||
} else if (!prevProps && props.defaultExpandAll || !prevProps && props.defaultExpandedKeys) {
|
||||
st.expandedKeys = this.getDefaultExpandedKeys(nextProps);
|
||||
|
|
|
@ -34454,8 +34454,7 @@
|
|||
return !prevProps && name in nextProps || prevProps && prevProps[name] !== nextProps[name];
|
||||
}
|
||||
// ================ expandedKeys =================
|
||||
// if (needSync('expandedKeys') || (prevProps && needSync('autoExpandParent'))) {
|
||||
if (needSync('expandedKeys')) {
|
||||
if (needSync('expandedKeys') || prevProps && needSync('autoExpandParent') || prevProps && prevProps['expandedKeys'] !== expandedKeys) {
|
||||
st.expandedKeys = expandedKeys;
|
||||
} else if (!prevProps && props.defaultExpandAll || !prevProps && props.defaultExpandedKeys) {
|
||||
st.expandedKeys = this.getDefaultExpandedKeys(nextProps);
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -118,8 +118,7 @@ class Tree extends React.Component {
|
|||
return (!prevProps && name in nextProps) || (prevProps && prevProps[name] !== nextProps[name]);
|
||||
}
|
||||
// ================ expandedKeys =================
|
||||
// if (needSync('expandedKeys') || (prevProps && needSync('autoExpandParent'))) {
|
||||
if (needSync('expandedKeys')) {
|
||||
if (needSync('expandedKeys') || (prevProps && needSync('autoExpandParent')) || (prevProps && prevProps['expandedKeys'] !== expandedKeys)) {
|
||||
st.expandedKeys = expandedKeys;
|
||||
} else if ((!prevProps && props.defaultExpandAll) || (!prevProps && props.defaultExpandedKeys)) {
|
||||
st.expandedKeys = this.getDefaultExpandedKeys(nextProps);
|
||||
|
|
Loading…
Reference in New Issue