next-helios-fe 1.10.7 → 1.10.9
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 +4 -8
package/package.json
CHANGED
|
@@ -780,7 +780,7 @@ export const Table: TableComponentProps = ({
|
|
|
780
780
|
return (
|
|
781
781
|
<td
|
|
782
782
|
key={headerItem.key}
|
|
783
|
-
className="whitespace-nowrap bg-secondary-bg px-4 py-1.5
|
|
783
|
+
className="whitespace-nowrap bg-secondary-bg px-4 py-1.5"
|
|
784
784
|
>
|
|
785
785
|
{headerItem.render(item) || "-"}
|
|
786
786
|
</td>
|
|
@@ -951,7 +951,7 @@ export const Table: TableComponentProps = ({
|
|
|
951
951
|
options={{ variant: "primary", width: "fit" }}
|
|
952
952
|
disabled={loading}
|
|
953
953
|
onClick={() => {
|
|
954
|
-
const exportData = filteredData?.map((item) => {
|
|
954
|
+
const exportData = filteredData?.map((item, index) => {
|
|
955
955
|
return header
|
|
956
956
|
?.filter(
|
|
957
957
|
(headerItem) =>
|
|
@@ -960,18 +960,14 @@ export const Table: TableComponentProps = ({
|
|
|
960
960
|
?.reduce((acc, headerItem) => {
|
|
961
961
|
return {
|
|
962
962
|
...acc,
|
|
963
|
-
"No.": (
|
|
964
|
-
(page - 1) * maxRow +
|
|
965
|
-
filteredData?.indexOf(item) +
|
|
966
|
-
1
|
|
967
|
-
)?.toString(),
|
|
963
|
+
"No.": (index + 1)?.toString(),
|
|
968
964
|
[headerItem.title]:
|
|
969
965
|
item[headerItem.key as keyof typeof item],
|
|
970
966
|
};
|
|
971
967
|
}, {});
|
|
972
968
|
});
|
|
973
969
|
|
|
974
|
-
handleExportData(title || "
|
|
970
|
+
handleExportData(title || "Table Data", exportData);
|
|
975
971
|
}}
|
|
976
972
|
>
|
|
977
973
|
Export
|