next-helios-fe 1.4.39 → 1.4.40

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.4.39",
3
+ "version": "1.4.40",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -112,15 +112,17 @@ export const Table: TableComponentProps = ({
112
112
  if (checkbox?.checked) {
113
113
  setSelected(checkbox?.checked);
114
114
  }
115
- }, [checkbox]);
115
+ }, [checkbox?.checked]);
116
116
 
117
117
  useEffect(() => {
118
- checkbox?.onChange &&
119
- checkbox.onChange({
120
- target: {
121
- checked: selected,
122
- },
123
- });
118
+ if (selected && selected.length !== 0) {
119
+ checkbox?.onChange &&
120
+ checkbox.onChange({
121
+ target: {
122
+ checked: selected,
123
+ },
124
+ });
125
+ }
124
126
  }, [selected]);
125
127
 
126
128
  useEffect(() => {
@@ -399,7 +401,7 @@ export const Table: TableComponentProps = ({
399
401
  ? true
400
402
  : false
401
403
  }
402
- onClick={() => {
404
+ onClick={(e) => {
403
405
  if (
404
406
  selected.find((selectedItem) => selectedItem.id === item.id)
405
407
  ) {