@sheinx/hooks 3.1.8 → 3.1.9
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/use-table/use-table-layout.d.ts.map +1 -1
- package/cjs/components/use-table/use-table-layout.js +2 -1
- package/cjs/components/use-treeselect/use-treeselect.js +3 -3
- package/esm/components/use-table/use-table-layout.d.ts.map +1 -1
- package/esm/components/use-table/use-table-layout.js +2 -1
- package/esm/components/use-treeselect/use-treeselect.js +3 -3
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-table-layout.d.ts","sourceRoot":"","sources":["use-table-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAcrE,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,cAAc,CAAC,GAAG,CAAC,EACnB,MAAM,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,OAAO,CAC7E;IACD,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,cAAc,UAAW,mBAAmB;;;;;;;;;;;yBA8CX,MAAM,UAAU,MAAM;;;;;;;;
|
1
|
+
{"version":3,"file":"use-table-layout.d.ts","sourceRoot":"","sources":["use-table-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAcrE,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,cAAc,CAAC,GAAG,CAAC,EACnB,MAAM,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,OAAO,CAC7E;IACD,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,cAAc,UAAW,mBAAmB;;;;;;;;;;;yBA8CX,MAAM,UAAU,MAAM;;;;;;;;CA+N5D,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -263,7 +263,8 @@ var useTableLayout = function useTableLayout(props) {
|
|
263
263
|
changeColGroup(newCols, false);
|
264
264
|
});
|
265
265
|
var checkFloat = (0, _usePersistFn.default)(function () {
|
266
|
-
var scrollEl = scrollRef.current;
|
266
|
+
var scrollEl = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current;
|
267
|
+
if (!scrollEl) return;
|
267
268
|
var max = scrollEl.scrollWidth - scrollEl.clientWidth;
|
268
269
|
var min = 0;
|
269
270
|
var left = scrollEl.scrollLeft;
|
@@ -37,13 +37,13 @@ var useTreeSelect = function useTreeSelect(props) {
|
|
37
37
|
}
|
38
38
|
if (!multiple && (0, _is.isArray)(v)) {
|
39
39
|
onChange === null || onChange === void 0 || onChange.apply(void 0, [v[0]].concat(reset));
|
40
|
-
}
|
41
|
-
if (multiple && !(0, _is.isArray)(v)) {
|
40
|
+
} else if (multiple && !(0, _is.isArray)(v)) {
|
42
41
|
if (v === undefined || v === null) {
|
43
42
|
onChange === null || onChange === void 0 || onChange.apply(void 0, [[]].concat(reset));
|
44
43
|
} else onChange === null || onChange === void 0 || onChange.apply(void 0, [[v]].concat(reset));
|
44
|
+
} else {
|
45
|
+
onChange === null || onChange === void 0 || onChange.apply(void 0, [v].concat(reset));
|
45
46
|
}
|
46
|
-
onChange === null || onChange === void 0 || onChange.apply(void 0, [v].concat(reset));
|
47
47
|
});
|
48
48
|
return {
|
49
49
|
value: valueArr,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"use-table-layout.d.ts","sourceRoot":"","sources":["use-table-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAcrE,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,cAAc,CAAC,GAAG,CAAC,EACnB,MAAM,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,OAAO,CAC7E;IACD,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,cAAc,UAAW,mBAAmB;;;;;;;;;;;yBA8CX,MAAM,UAAU,MAAM;;;;;;;;
|
1
|
+
{"version":3,"file":"use-table-layout.d.ts","sourceRoot":"","sources":["use-table-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAKlE,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAcrE,MAAM,WAAW,mBACf,SAAQ,IAAI,CACV,cAAc,CAAC,GAAG,CAAC,EACnB,MAAM,GAAG,kBAAkB,GAAG,iBAAiB,GAAG,gBAAgB,GAAG,OAAO,CAC7E;IACD,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;IAClC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,cAAc,UAAW,mBAAmB;;;;;;;;;;;yBA8CX,MAAM,UAAU,MAAM;;;;;;;;CA+N5D,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
@@ -254,7 +254,8 @@ var useTableLayout = function useTableLayout(props) {
|
|
254
254
|
changeColGroup(newCols, false);
|
255
255
|
});
|
256
256
|
var checkFloat = usePersistFn(function () {
|
257
|
-
var scrollEl = scrollRef.current;
|
257
|
+
var scrollEl = scrollRef === null || scrollRef === void 0 ? void 0 : scrollRef.current;
|
258
|
+
if (!scrollEl) return;
|
258
259
|
var max = scrollEl.scrollWidth - scrollEl.clientWidth;
|
259
260
|
var min = 0;
|
260
261
|
var left = scrollEl.scrollLeft;
|
@@ -30,13 +30,13 @@ var useTreeSelect = function useTreeSelect(props) {
|
|
30
30
|
}
|
31
31
|
if (!multiple && isArray(v)) {
|
32
32
|
onChange === null || onChange === void 0 || onChange.apply(void 0, [v[0]].concat(reset));
|
33
|
-
}
|
34
|
-
if (multiple && !isArray(v)) {
|
33
|
+
} else if (multiple && !isArray(v)) {
|
35
34
|
if (v === undefined || v === null) {
|
36
35
|
onChange === null || onChange === void 0 || onChange.apply(void 0, [[]].concat(reset));
|
37
36
|
} else onChange === null || onChange === void 0 || onChange.apply(void 0, [[v]].concat(reset));
|
37
|
+
} else {
|
38
|
+
onChange === null || onChange === void 0 || onChange.apply(void 0, [v].concat(reset));
|
38
39
|
}
|
39
|
-
onChange === null || onChange === void 0 || onChange.apply(void 0, [v].concat(reset));
|
40
40
|
});
|
41
41
|
return {
|
42
42
|
value: valueArr,
|