@sheinx/hooks 3.7.10-beta.2 → 3.7.10-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-tree.d.ts","sourceRoot":"","sources":["use-tree.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAKb,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiBjD,eAAO,MAAM,IAAI;IACf;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEJ,CAAC;AAEF,QAAA,MAAM,OAAO;;;;;
|
1
|
+
{"version":3,"file":"use-tree.d.ts","sourceRoot":"","sources":["use-tree.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAKb,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiBjD,eAAO,MAAM,IAAI;IACf;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEJ,CAAC;AAEF,QAAA,MAAM,OAAO;;;;;CAgtBZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
@@ -629,6 +629,17 @@ var useTree = function useTree(props) {
|
|
629
629
|
call('expanded', tempExpandMap.has(id));
|
630
630
|
});
|
631
631
|
});
|
632
|
+
(0, _react.useEffect)(function () {
|
633
|
+
if (props.datum) return;
|
634
|
+
if (!dataUpdate) return;
|
635
|
+
setData(data);
|
636
|
+
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
637
|
+
if (!defaultExpandAll && !(0, _utils.shallowEqual)(nextExpanded, expanded)) {
|
638
|
+
onExpand(nextExpanded);
|
639
|
+
updateExpanded(nextExpanded, true);
|
640
|
+
}
|
641
|
+
updateInnerCheckStatus();
|
642
|
+
}, [props.data]);
|
632
643
|
(0, _react.useEffect)(function () {
|
633
644
|
if (defaultExpandAll) {
|
634
645
|
var nextExpanded = [];
|
@@ -641,17 +652,6 @@ var useTree = function useTree(props) {
|
|
641
652
|
updateExpanded(nextExpanded, true);
|
642
653
|
}
|
643
654
|
}, [context.dataMap, props.data]);
|
644
|
-
(0, _react.useEffect)(function () {
|
645
|
-
if (props.datum) return;
|
646
|
-
if (!dataUpdate) return;
|
647
|
-
setData(data);
|
648
|
-
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
649
|
-
if (!defaultExpandAll && !(0, _utils.shallowEqual)(nextExpanded, expanded)) {
|
650
|
-
onExpand(nextExpanded);
|
651
|
-
updateExpanded(nextExpanded, true);
|
652
|
-
}
|
653
|
-
updateInnerCheckStatus();
|
654
|
-
}, [props.data]);
|
655
655
|
(0, _react.useEffect)(function () {
|
656
656
|
if (props.datum) return;
|
657
657
|
setValue(value);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-tree.d.ts","sourceRoot":"","sources":["use-tree.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAKb,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiBjD,eAAO,MAAM,IAAI;IACf;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEJ,CAAC;AAEF,QAAA,MAAM,OAAO;;;;;
|
1
|
+
{"version":3,"file":"use-tree.d.ts","sourceRoot":"","sources":["use-tree.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,aAAa,EAKb,SAAS,EAIV,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAiBjD,eAAO,MAAM,IAAI;IACf;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;CAEJ,CAAC;AAEF,QAAA,MAAM,OAAO;;;;;CAgtBZ,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
@@ -622,6 +622,17 @@ var useTree = function useTree(props) {
|
|
622
622
|
call('expanded', tempExpandMap.has(id));
|
623
623
|
});
|
624
624
|
});
|
625
|
+
useEffect(function () {
|
626
|
+
if (props.datum) return;
|
627
|
+
if (!dataUpdate) return;
|
628
|
+
setData(data);
|
629
|
+
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
630
|
+
if (!defaultExpandAll && !shallowEqual(nextExpanded, expanded)) {
|
631
|
+
onExpand(nextExpanded);
|
632
|
+
updateExpanded(nextExpanded, true);
|
633
|
+
}
|
634
|
+
updateInnerCheckStatus();
|
635
|
+
}, [props.data]);
|
625
636
|
useEffect(function () {
|
626
637
|
if (defaultExpandAll) {
|
627
638
|
var nextExpanded = [];
|
@@ -634,17 +645,6 @@ var useTree = function useTree(props) {
|
|
634
645
|
updateExpanded(nextExpanded, true);
|
635
646
|
}
|
636
647
|
}, [context.dataMap, props.data]);
|
637
|
-
useEffect(function () {
|
638
|
-
if (props.datum) return;
|
639
|
-
if (!dataUpdate) return;
|
640
|
-
setData(data);
|
641
|
-
var nextExpanded = props.expanded || props.defaultExpanded || [];
|
642
|
-
if (!defaultExpandAll && !shallowEqual(nextExpanded, expanded)) {
|
643
|
-
onExpand(nextExpanded);
|
644
|
-
updateExpanded(nextExpanded, true);
|
645
|
-
}
|
646
|
-
updateInnerCheckStatus();
|
647
|
-
}, [props.data]);
|
648
648
|
useEffect(function () {
|
649
649
|
if (props.datum) return;
|
650
650
|
setValue(value);
|