next-helios-fe 1.4.37 → 1.4.39
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.
package/package.json
CHANGED
@@ -55,12 +55,14 @@ interface TableProps {
|
|
55
55
|
id: number | string;
|
56
56
|
[key: string]: any;
|
57
57
|
}[];
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
58
|
+
onChange?: (e: {
|
59
|
+
target: {
|
60
|
+
checked: {
|
61
|
+
id: number | string;
|
62
|
+
[key: string]: any;
|
63
|
+
}[];
|
64
|
+
};
|
65
|
+
}) => void;
|
64
66
|
};
|
65
67
|
actionColumn?: (e: any) => React.ReactNode;
|
66
68
|
}
|
@@ -113,9 +115,12 @@ export const Table: TableComponentProps = ({
|
|
113
115
|
}, [checkbox]);
|
114
116
|
|
115
117
|
useEffect(() => {
|
116
|
-
|
117
|
-
checkbox
|
118
|
-
|
118
|
+
checkbox?.onChange &&
|
119
|
+
checkbox.onChange({
|
120
|
+
target: {
|
121
|
+
checked: selected,
|
122
|
+
},
|
123
|
+
});
|
119
124
|
}, [selected]);
|
120
125
|
|
121
126
|
useEffect(() => {
|
@@ -394,7 +399,7 @@ export const Table: TableComponentProps = ({
|
|
394
399
|
? true
|
395
400
|
: false
|
396
401
|
}
|
397
|
-
|
402
|
+
onClick={() => {
|
398
403
|
if (
|
399
404
|
selected.find((selectedItem) => selectedItem.id === item.id)
|
400
405
|
) {
|