next-helios-fe 1.7.12 → 1.7.13

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.12",
3
+ "version": "1.7.13",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -43,6 +43,7 @@ interface TableProps {
43
43
  customTool?: {
44
44
  icon: string;
45
45
  variant: "primary" | "secondary" | "success" | "warning" | "danger";
46
+ show?: boolean;
46
47
  onClick: (e: React.MouseEvent<HTMLButtonElement>) => void;
47
48
  }[];
48
49
  };
@@ -495,18 +496,20 @@ export const Table: TableComponentProps = ({
495
496
  ? "bg-danger hover:bg-danger-dark"
496
497
  : "bg-primary hover:bg-primary-dark";
497
498
 
498
- return (
499
- <button
500
- key={index}
501
- type="button"
502
- className={`p-1.5 rounded-full text-white ${variant}`}
503
- onClick={(e) => {
504
- item.onClick && item.onClick(e);
505
- }}
506
- >
507
- <Icon icon={item.icon} className="text-2xl" />
508
- </button>
509
- );
499
+ if (item.show !== false) {
500
+ return (
501
+ <button
502
+ key={index}
503
+ type="button"
504
+ className={`p-1.5 rounded-full text-white ${variant}`}
505
+ onClick={(e) => {
506
+ item.onClick && item.onClick(e);
507
+ }}
508
+ >
509
+ <Icon icon={item.icon} className="text-2xl" />
510
+ </button>
511
+ );
512
+ }
510
513
  })}
511
514
  {options?.toolbar?.addData?.show !== false && (
512
515
  <button