next-helios-fe 1.8.144 → 1.8.146
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
@@ -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"
|
596
|
+
item?.type === "category" || item.disableSearch
|
597
|
+
? "invisible"
|
598
|
+
: ""
|
594
599
|
}`}
|
595
600
|
>
|
596
601
|
{item.type !== "date" && (
|