next-helios-fe 1.8.140 → 1.8.142
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/dist/index.js +1 -1
- package/package.json +1 -1
- package/src/components/table/index.tsx +21 -21
package/package.json
CHANGED
@@ -222,7 +222,10 @@ export const Table: TableComponentProps = ({
|
|
222
222
|
|
223
223
|
setCategoryFilter(tempCategoryFilter);
|
224
224
|
setDateFilter(tempDateFilter);
|
225
|
-
|
225
|
+
|
226
|
+
if (dynamicTable?.getValue) {
|
227
|
+
setIsReadyForDynamicValue(true);
|
228
|
+
}
|
226
229
|
}
|
227
230
|
}, [
|
228
231
|
data,
|
@@ -432,7 +435,7 @@ export const Table: TableComponentProps = ({
|
|
432
435
|
<th
|
433
436
|
key={item.key}
|
434
437
|
className={`whitespace-nowrap bg-secondary-bg px-4 py-2 text-left font-medium ${
|
435
|
-
item.type === "date"
|
438
|
+
item.type === "date" ? "min-w-56" : "min-w-36"
|
436
439
|
}`}
|
437
440
|
>
|
438
441
|
<div className="flex flex-col">
|
@@ -785,7 +788,7 @@ export const Table: TableComponentProps = ({
|
|
785
788
|
})}
|
786
789
|
{actionColumn &&
|
787
790
|
React.Children.toArray(actionColumn()).length !== 0 && (
|
788
|
-
<td className="sticky right-0 w-8 bg-secondary-bg px-4 py-1.5 text-center">
|
791
|
+
<td className="sticky right-0 min-w-8 bg-secondary-bg px-4 py-1.5 text-center">
|
789
792
|
{actionColumn(item)}
|
790
793
|
</td>
|
791
794
|
)}
|
@@ -794,7 +797,7 @@ export const Table: TableComponentProps = ({
|
|
794
797
|
});
|
795
798
|
|
796
799
|
return (
|
797
|
-
<div className="flex h-full flex-col gap-6">
|
800
|
+
<div className="relative flex h-full flex-col gap-6">
|
798
801
|
{(title ||
|
799
802
|
options?.toolbar?.addData?.show !== false ||
|
800
803
|
options?.toolbar?.filter?.show !== false ||
|
@@ -952,7 +955,7 @@ export const Table: TableComponentProps = ({
|
|
952
955
|
</div>
|
953
956
|
)}
|
954
957
|
<div
|
955
|
-
className={`flex flex
|
958
|
+
className={`flex-1 flex overflow-auto ${height} ${
|
956
959
|
options?.border && "rounded-md border"
|
957
960
|
}`}
|
958
961
|
>
|
@@ -1087,7 +1090,7 @@ export const Table: TableComponentProps = ({
|
|
1087
1090
|
{headerArr}
|
1088
1091
|
{actionColumn &&
|
1089
1092
|
React.Children.toArray(actionColumn()).length !== 0 && (
|
1090
|
-
<th className="sticky right-0 z-10 w-8 whitespace-nowrap bg-secondary-bg px-4 py-2 text-center font-medium">
|
1093
|
+
<th className="sticky right-0 z-10 min-w-8 whitespace-nowrap bg-secondary-bg px-4 py-2 text-center font-medium">
|
1091
1094
|
<div className="flex flex-col">
|
1092
1095
|
<span>Actions</span>
|
1093
1096
|
{options?.toolbar?.columnSearch?.show !== false && (
|
@@ -1111,21 +1114,6 @@ export const Table: TableComponentProps = ({
|
|
1111
1114
|
dataArr}
|
1112
1115
|
</tbody>
|
1113
1116
|
</table>
|
1114
|
-
{(loading ||
|
1115
|
-
!filteredData ||
|
1116
|
-
(dynamicTable?.setValue?.totalData ?? filteredData?.length) ===
|
1117
|
-
0) && (
|
1118
|
-
<div className="flex h-full items-center justify-center whitespace-nowrap bg-secondary-bg px-4 py-1.5 text-center">
|
1119
|
-
{loading ? (
|
1120
|
-
<Icon
|
1121
|
-
icon="mingcute:loading-fill"
|
1122
|
-
className="animate-spin text-3xl text-primary"
|
1123
|
-
/>
|
1124
|
-
) : (
|
1125
|
-
<span>No data found</span>
|
1126
|
-
)}
|
1127
|
-
</div>
|
1128
|
-
)}
|
1129
1117
|
</div>
|
1130
1118
|
{options?.toolbar?.pagination?.show !== false && (
|
1131
1119
|
<div className="flex h-fit w-full items-end justify-between gap-2">
|
@@ -1263,6 +1251,18 @@ export const Table: TableComponentProps = ({
|
|
1263
1251
|
</div>
|
1264
1252
|
</div>
|
1265
1253
|
)}
|
1254
|
+
{(loading || !filteredData || filteredData?.length === 0) && (
|
1255
|
+
<div className="absolute top-0 left-0 flex h-full w-full items-center justify-center whitespace-nowrap px-4 py-1.5 text-center pointer-events-none">
|
1256
|
+
{loading ? (
|
1257
|
+
<Icon
|
1258
|
+
icon="mingcute:loading-fill"
|
1259
|
+
className="animate-spin text-3xl text-primary"
|
1260
|
+
/>
|
1261
|
+
) : (
|
1262
|
+
<span>No data found</span>
|
1263
|
+
)}
|
1264
|
+
</div>
|
1265
|
+
)}
|
1266
1266
|
</div>
|
1267
1267
|
);
|
1268
1268
|
};
|