next-helios-fe 1.4.39 → 1.4.41

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.41",
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(() => {
@@ -391,7 +393,7 @@ export const Table: TableComponentProps = ({
391
393
  return (
392
394
  <tr key={item.id}>
393
395
  {checkbox && (
394
- <td className="sticky left-0 w-8 px-4 py-1 bg-secondary-bg">
396
+ <td className="sticky left-0 w-8 px-4 py-1.5 bg-secondary-bg">
395
397
  <Form.Checkbox
396
398
  options={{ disableHover: true }}
397
399
  checked={
@@ -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
  ) {
@@ -412,7 +414,7 @@ export const Table: TableComponentProps = ({
412
414
  </td>
413
415
  )}
414
416
  {!options?.hideNumberColumn && (
415
- <td className="sticky left-0 px-4 py-1 bg-secondary-bg text-center">
417
+ <td className="sticky left-0 px-4 py-1.5 bg-secondary-bg text-center">
416
418
  {(page - 1) * maxRow + index + 1}
417
419
  </td>
418
420
  )}
@@ -423,7 +425,7 @@ export const Table: TableComponentProps = ({
423
425
  return (
424
426
  <td
425
427
  key={headerItem.key}
426
- className="px-4 py-1 bg-secondary-bg whitespace-nowrap"
428
+ className="px-4 py-1.5 bg-secondary-bg whitespace-nowrap"
427
429
  >
428
430
  {headerItem.render(item)}
429
431
  </td>
@@ -432,7 +434,7 @@ export const Table: TableComponentProps = ({
432
434
  return (
433
435
  <td
434
436
  key={headerItem.key}
435
- className="px-4 py-1 bg-secondary-bg whitespace-nowrap"
437
+ className="px-4 py-1.5 bg-secondary-bg whitespace-nowrap"
436
438
  >
437
439
  {item[headerItem.key as keyof typeof item]}
438
440
  </td>
@@ -440,7 +442,7 @@ export const Table: TableComponentProps = ({
440
442
  }
441
443
  })}
442
444
  {actionColumn && (
443
- <td className="sticky right-0 px-4 py-1 bg-secondary-bg text-center">
445
+ <td className="sticky right-0 px-4 py-1.5 bg-secondary-bg text-center">
444
446
  {actionColumn(item)}
445
447
  </td>
446
448
  )}