next-helios-fe 1.8.143 → 1.8.145

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.8.143",
3
+ "version": "1.8.145",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -18,6 +18,8 @@ interface TableProps {
18
18
  defaultHide?: boolean;
19
19
  type?: "basic" | "category" | "date" | string;
20
20
  render?: (item: any) => React.ReactNode;
21
+ disableSort?: boolean;
22
+ disableSearch?: boolean;
21
23
  }[];
22
24
  data: {
23
25
  id?: number | string;
@@ -443,6 +445,7 @@ export const Table: TableComponentProps = ({
443
445
  <button
444
446
  type="button"
445
447
  className="group/header flex w-full items-center justify-between gap-4"
448
+ disabled={item.disableSort}
446
449
  onClick={() => {
447
450
  setSortBy((prev: any) => {
448
451
  if (prev.column !== item.key) {
@@ -467,7 +470,7 @@ export const Table: TableComponentProps = ({
467
470
  ? "arrow-down"
468
471
  : "sort"
469
472
  }`}
470
- className={`group-hover/header:visible ${
473
+ className={`group-hover/header:visible group-disabled/header:hidden ${
471
474
  item.key === sortBy.column ? "visible" : "invisible"
472
475
  }`}
473
476
  />
@@ -590,7 +593,9 @@ export const Table: TableComponentProps = ({
590
593
  {options?.toolbar?.columnSearch?.show !== false && (
591
594
  <div
592
595
  className={`relative flex items-center ${
593
- item?.type === "category" && "invisible"
596
+ item?.type === "category" || item.disableSort
597
+ ? "invisible"
598
+ : ""
594
599
  }`}
595
600
  >
596
601
  {item.type !== "date" && (
@@ -955,7 +960,7 @@ export const Table: TableComponentProps = ({
955
960
  </div>
956
961
  )}
957
962
  <div
958
- className={`flex-1 flex flex-col overflow-auto ${height} ${
963
+ className={`flex flex-col overflow-auto ${height} ${
959
964
  options?.border && "rounded-md border"
960
965
  }`}
961
966
  >