nectiasw 0.0.23 → 0.0.24
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,10 +1,9 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface ICheckbox {
|
|
4
|
-
[key: string]: unknown;
|
|
5
4
|
checked?: boolean;
|
|
6
5
|
}
|
|
7
|
-
export declare function useCheckbox<T extends ICheckbox>(propertyName?:
|
|
6
|
+
export declare function useCheckbox<T extends ICheckbox>(propertyName?: keyof T): {
|
|
8
7
|
checkboxList: T[];
|
|
9
8
|
checkboxHead: boolean;
|
|
10
9
|
setCheckboxList: React.Dispatch<React.SetStateAction<T[]>>;
|
package/dist/index.es.js
CHANGED
|
@@ -55732,13 +55732,12 @@ function nde(e) {
|
|
|
55732
55732
|
setCheckboxList: t,
|
|
55733
55733
|
setCheckboxHead: i,
|
|
55734
55734
|
handleChangeCheckbox: (s, l) => {
|
|
55735
|
-
|
|
55736
|
-
|
|
55737
|
-
(
|
|
55738
|
-
|
|
55739
|
-
|
|
55740
|
-
|
|
55741
|
-
t((d) => d.map((h) => h.detailId === c ? { ...h, checked: s } : h));
|
|
55735
|
+
if (e)
|
|
55736
|
+
return t(
|
|
55737
|
+
(c) => c.map(
|
|
55738
|
+
(d) => d[e] === l ? { ...d, checked: s } : d
|
|
55739
|
+
)
|
|
55740
|
+
);
|
|
55742
55741
|
},
|
|
55743
55742
|
handleChangeCheckboxHead: (s) => {
|
|
55744
55743
|
const l = n.map((c) => ({
|