next-helios-fe 1.6.6 → 1.6.8
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
@@ -11,6 +11,7 @@ interface TableProps {
|
|
11
11
|
header: {
|
12
12
|
title: string;
|
13
13
|
key: string;
|
14
|
+
defaultHide?: boolean;
|
14
15
|
type?: "basic" | "category" | string;
|
15
16
|
render?: (item: any) => React.ReactNode;
|
16
17
|
}[];
|
@@ -125,6 +126,12 @@ export const Table: TableComponentProps = ({
|
|
125
126
|
}
|
126
127
|
}, [selected]);
|
127
128
|
|
129
|
+
useEffect(() => {
|
130
|
+
const tempExcludedColumn = header.filter((item) => item.defaultHide);
|
131
|
+
|
132
|
+
setExcludedColumn(tempExcludedColumn.map((item) => item.key));
|
133
|
+
}, [header]);
|
134
|
+
|
128
135
|
useEffect(() => {
|
129
136
|
setFilter(
|
130
137
|
header?.map((item) => {
|
@@ -418,7 +425,7 @@ export const Table: TableComponentProps = ({
|
|
418
425
|
</td>
|
419
426
|
)}
|
420
427
|
{!options?.hideNumberColumn && (
|
421
|
-
<td className="sticky left-0 w-
|
428
|
+
<td className="sticky left-0 w-8 px-4 py-1.5 bg-secondary-bg text-center">
|
422
429
|
{(page - 1) * maxRow + index + 1}
|
423
430
|
</td>
|
424
431
|
)}
|
@@ -446,7 +453,7 @@ export const Table: TableComponentProps = ({
|
|
446
453
|
}
|
447
454
|
})}
|
448
455
|
{actionColumn && (
|
449
|
-
<td className="sticky right-0 w-
|
456
|
+
<td className="sticky right-0 w-8 px-4 py-1.5 bg-secondary-bg text-center">
|
450
457
|
{actionColumn(item)}
|
451
458
|
</td>
|
452
459
|
)}
|
@@ -625,7 +632,7 @@ export const Table: TableComponentProps = ({
|
|
625
632
|
</th>
|
626
633
|
)}
|
627
634
|
{!options?.hideNumberColumn && (
|
628
|
-
<th className="sticky left-0 w-
|
635
|
+
<th className="sticky left-0 w-8 px-4 py-2 z-10 bg-secondary-bg font-medium text-center whitespace-nowrap">
|
629
636
|
<div className="flex flex-col">
|
630
637
|
<span>No.</span>
|
631
638
|
{options?.toolbar?.columnSearch?.show !== false && (
|
@@ -641,7 +648,7 @@ export const Table: TableComponentProps = ({
|
|
641
648
|
)}
|
642
649
|
{headerArr}
|
643
650
|
{actionColumn && (
|
644
|
-
<th className="sticky right-0 w-
|
651
|
+
<th className="sticky right-0 w-8 px-4 py-2 z-10 bg-secondary-bg font-medium text-center whitespace-nowrap">
|
645
652
|
<div className="flex flex-col">
|
646
653
|
<span>Actions</span>
|
647
654
|
{options?.toolbar?.columnSearch?.show !== false && (
|