next-helios-fe 1.8.141 → 1.8.143

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.141",
3
+ "version": "1.8.143",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -435,7 +435,7 @@ export const Table: TableComponentProps = ({
435
435
  <th
436
436
  key={item.key}
437
437
  className={`whitespace-nowrap bg-secondary-bg px-4 py-2 text-left font-medium ${
438
- item.type === "date" && "min-w-56"
438
+ item.type === "date" ? "min-w-56" : "min-w-36"
439
439
  }`}
440
440
  >
441
441
  <div className="flex flex-col">
@@ -788,7 +788,7 @@ export const Table: TableComponentProps = ({
788
788
  })}
789
789
  {actionColumn &&
790
790
  React.Children.toArray(actionColumn()).length !== 0 && (
791
- <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">
792
792
  {actionColumn(item)}
793
793
  </td>
794
794
  )}
@@ -797,7 +797,7 @@ export const Table: TableComponentProps = ({
797
797
  });
798
798
 
799
799
  return (
800
- <div className="flex h-full flex-col gap-6">
800
+ <div className="relative flex h-full flex-col gap-6">
801
801
  {(title ||
802
802
  options?.toolbar?.addData?.show !== false ||
803
803
  options?.toolbar?.filter?.show !== false ||
@@ -955,7 +955,7 @@ export const Table: TableComponentProps = ({
955
955
  </div>
956
956
  )}
957
957
  <div
958
- className={`flex flex-col overflow-auto ${height} ${
958
+ className={`flex-1 flex flex-col overflow-auto ${height} ${
959
959
  options?.border && "rounded-md border"
960
960
  }`}
961
961
  >
@@ -1090,7 +1090,7 @@ export const Table: TableComponentProps = ({
1090
1090
  {headerArr}
1091
1091
  {actionColumn &&
1092
1092
  React.Children.toArray(actionColumn()).length !== 0 && (
1093
- <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">
1094
1094
  <div className="flex flex-col">
1095
1095
  <span>Actions</span>
1096
1096
  {options?.toolbar?.columnSearch?.show !== false && (
@@ -1114,21 +1114,6 @@ export const Table: TableComponentProps = ({
1114
1114
  dataArr}
1115
1115
  </tbody>
1116
1116
  </table>
1117
- {(loading ||
1118
- !filteredData ||
1119
- (dynamicTable?.setValue?.totalData ?? filteredData?.length) ===
1120
- 0) && (
1121
- <div className="flex h-full items-center justify-center whitespace-nowrap bg-secondary-bg px-4 py-1.5 text-center">
1122
- {loading ? (
1123
- <Icon
1124
- icon="mingcute:loading-fill"
1125
- className="animate-spin text-3xl text-primary"
1126
- />
1127
- ) : (
1128
- <span>No data found</span>
1129
- )}
1130
- </div>
1131
- )}
1132
1117
  </div>
1133
1118
  {options?.toolbar?.pagination?.show !== false && (
1134
1119
  <div className="flex h-fit w-full items-end justify-between gap-2">
@@ -1266,6 +1251,18 @@ export const Table: TableComponentProps = ({
1266
1251
  </div>
1267
1252
  </div>
1268
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
+ )}
1269
1266
  </div>
1270
1267
  );
1271
1268
  };