next-helios-fe 1.7.11 → 1.7.12

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.7.11",
3
+ "version": "1.7.12",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -63,7 +63,7 @@ interface TableProps {
63
63
  }[]
64
64
  ) => void;
65
65
  };
66
- actionColumn?: (e: any) => React.ReactNode;
66
+ actionColumn?: (e?: any) => React.ReactNode;
67
67
  }
68
68
 
69
69
  interface TableComponentProps extends React.FC<TableProps> {
@@ -457,11 +457,12 @@ export const Table: TableComponentProps = ({
457
457
  );
458
458
  }
459
459
  })}
460
- {actionColumn && (
461
- <td className="sticky right-0 w-8 px-4 py-1.5 bg-secondary-bg text-center">
462
- {actionColumn(item)}
463
- </td>
464
- )}
460
+ {actionColumn &&
461
+ React.Children.toArray(actionColumn()).length !== 0 && (
462
+ <td className="sticky right-0 w-8 px-4 py-1.5 bg-secondary-bg text-center">
463
+ {actionColumn(item)}
464
+ </td>
465
+ )}
465
466
  </tr>
466
467
  );
467
468
  });
@@ -686,21 +687,22 @@ export const Table: TableComponentProps = ({
686
687
  </th>
687
688
  )}
688
689
  {headerArr}
689
- {actionColumn && (
690
- <th className="sticky right-0 w-8 px-4 py-2 z-10 bg-secondary-bg font-medium text-center whitespace-nowrap">
691
- <div className="flex flex-col">
692
- <span>Actions</span>
693
- {options?.toolbar?.columnSearch?.show !== false && (
694
- <div className="invisible w-0 overflow-hidden">
695
- <input
696
- type="search"
697
- className="w-full px-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
698
- />
699
- </div>
700
- )}
701
- </div>
702
- </th>
703
- )}
690
+ {actionColumn &&
691
+ React.Children.toArray(actionColumn()).length !== 0 && (
692
+ <th className="sticky right-0 w-8 px-4 py-2 z-10 bg-secondary-bg font-medium text-center whitespace-nowrap">
693
+ <div className="flex flex-col">
694
+ <span>Actions</span>
695
+ {options?.toolbar?.columnSearch?.show !== false && (
696
+ <div className="invisible w-0 overflow-hidden">
697
+ <input
698
+ type="search"
699
+ className="w-full px-0 pt-0 pb-0.5 border-default border-t-0 border-b border-x-0 bg-secondary-bg text-sm font-normal placeholder:duration-300 placeholder:translate-x-0 [&::-webkit-search-cancel-button]:appearance-none focus:placeholder:translate-x-1 placeholder:text-slate-300 focus:outline-none focus:ring-0 focus:border-primary-dark disabled:bg-secondary-light disabled:text-slate-400"
700
+ />
701
+ </div>
702
+ )}
703
+ </div>
704
+ </th>
705
+ )}
704
706
  </tr>
705
707
  </thead>
706
708
  <tbody className="divide-y">