Skip to content

Commit

Permalink
[v4.13.7] fix(Tree): 初始值失效 (#638) cab0f1c
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 8, 2022
1 parent f04d2f3 commit ad98635
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 24 deletions.
10 changes: 5 additions & 5 deletions asset-manifest.json
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.74129d99.css",
"main.js": "/static/js/main.d3fde9ad.js",
"main.js": "/static/js/main.30b938ca.js",
"static/css/9200.14abaeb3.chunk.css": "/static/css/9200.14abaeb3.chunk.css",
"static/js/9200.0a1f7353.chunk.js": "/static/js/9200.0a1f7353.chunk.js",
"static/css/6730.dc5e9ddc.chunk.css": "/static/css/6730.dc5e9ddc.chunk.css",
Expand Down Expand Up @@ -213,11 +213,11 @@
"vendors-prismjs.js": "/static/js/vendors-prismjs.b53bdc3b.chunk.js",
"vendors-standalone.js": "/static/js/vendors-standalone.a406ae54.chunk.js",
"vendors-react.js": "/static/js/vendors-react.a09f50fb.js",
"static/js/2854.8f0f1b8d.chunk.js": "/static/js/2854.8f0f1b8d.chunk.js",
"static/js/2854.141de238.chunk.js": "/static/js/2854.141de238.chunk.js",
"static/js/5183.ac2ca737.js": "/static/js/5183.ac2ca737.js",
"index.html": "/index.html",
"main.74129d99.css.map": "/static/css/main.74129d99.css.map",
"main.d3fde9ad.js.map": "/static/js/main.d3fde9ad.js.map",
"main.30b938ca.js.map": "/static/js/main.30b938ca.js.map",
"9200.14abaeb3.chunk.css.map": "/static/css/9200.14abaeb3.chunk.css.map",
"9200.0a1f7353.chunk.js.map": "/static/js/9200.0a1f7353.chunk.js.map",
"6730.dc5e9ddc.chunk.css.map": "/static/css/6730.dc5e9ddc.chunk.css.map",
Expand Down Expand Up @@ -429,13 +429,13 @@
"vendors-prismjs.b53bdc3b.chunk.js.map": "/static/js/vendors-prismjs.b53bdc3b.chunk.js.map",
"vendors-standalone.a406ae54.chunk.js.map": "/static/js/vendors-standalone.a406ae54.chunk.js.map",
"vendors-react.a09f50fb.js.map": "/static/js/vendors-react.a09f50fb.js.map",
"2854.8f0f1b8d.chunk.js.map": "/static/js/2854.8f0f1b8d.chunk.js.map",
"2854.141de238.chunk.js.map": "/static/js/2854.141de238.chunk.js.map",
"5183.ac2ca737.js.map": "/static/js/5183.ac2ca737.js.map"
},
"entrypoints": [
"static/js/vendors-react.a09f50fb.js",
"static/js/5183.ac2ca737.js",
"static/css/main.74129d99.css",
"static/js/main.d3fde9ad.js"
"static/js/main.30b938ca.js"
]
}
2 changes: 1 addition & 1 deletion index.html
@@ -1 +1 @@
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>uiw react, A high quality UI Toolkit, A Component Library for React 16+.</title><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="UIW React, A high quality UI Toolkit, A Component Library for React 16+. "><meta name="keywords" content="uiw, uiw-react, uiwjs, react.js, react, component, components, ui, framework, toolkit"><script defer="defer" src="./static/js/vendors-react.a09f50fb.js"></script><script defer="defer" src="./static/js/5183.ac2ca737.js"></script><script defer="defer" src="./static/js/main.d3fde9ad.js"></script><link href="./static/css/main.74129d99.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
<!doctype html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>uiw react, A high quality UI Toolkit, A Component Library for React 16+.</title><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="description" content="UIW React, A high quality UI Toolkit, A Component Library for React 16+. "><meta name="keywords" content="uiw, uiw-react, uiwjs, react.js, react, component, components, ui, framework, toolkit"><script defer="defer" src="./static/js/vendors-react.a09f50fb.js"></script><script defer="defer" src="./static/js/5183.ac2ca737.js"></script><script defer="defer" src="./static/js/main.30b938ca.js"></script><link href="./static/css/main.74129d99.css" rel="stylesheet"></head><body><div id="root"></div></body></html>

Large diffs are not rendered by default.

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions static/js/main.d3fde9ad.js → static/js/main.30b938ca.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions static/js/main.30b938ca.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion static/js/main.d3fde9ad.js.map

This file was deleted.

16 changes: 6 additions & 10 deletions uiw.js
Expand Up @@ -9573,7 +9573,7 @@ function TreeNode(props) {
;// CONCATENATED MODULE: ../react-tree/esm/index.js


var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle", "onChange"];
var react_tree_esm_excluded = ["prefixCls", "icon", "data", "openKeys", "selectedKeys", "defaultExpandAll", "showLine", "iconAnimation", "isSelected", "checkStrictly", "multiple", "onExpand", "onSelected", "className", "autoExpandParent", "renderTitle", "onChange", "value"];



Expand Down Expand Up @@ -9689,20 +9689,16 @@ function Tree(props) {
className,
autoExpandParent = true,
renderTitle,
onChange
onChange,
value
} = props,
elementProps = _objectWithoutPropertiesLoose(props, react_tree_esm_excluded);

var [curOpenKeys, setCurOpenKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(openKeys);
var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(props.value || selectedKeys);
var [curSelectedKeys, setCurSelectedKeys] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(value || selectedKeys);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
setCurSelectedKeys(props.selectedKeys || []);
}, [JSON.stringify(props.selectedKeys)]);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
setCurSelectedKeys(props.value || []);
}, [JSON.stringify(props.value)]); // useEffect(() => setCurOpenKeys(openKeys), [openKeys]);
// useEffect(() => setCurSelectedKeys(selectedKeys), [selectedKeys]);

setCurSelectedKeys(props.value || props.selectedKeys || []);
}, [JSON.stringify(props.selectedKeys), JSON.stringify(props.value)]);
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
var arrOpenKeys = [...curOpenKeys];

Expand Down
2 changes: 1 addition & 1 deletion uiw.min.js

Large diffs are not rendered by default.

0 comments on commit ad98635

Please sign in to comment.