next-helios-fe 1.0.1 → 1.0.2

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.
@@ -32,6 +32,8 @@ PERFORMANCE OF THIS SOFTWARE.
32
32
 
33
33
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
34
34
 
35
+ /*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */
36
+
35
37
  /*! svg.draggable.js - v2.2.2 - 2019-01-08
36
38
  * https://github.com/svgdotjs/svg.draggable.js
37
39
  * Copyright (c) 2019 Wout Fierens; Licensed MIT */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "next-helios-fe",
3
- "version": "1.0.1",
4
- "description": "",
3
+ "version": "1.0.2",
4
+ "description": "fix export data bug in table component",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "scripts": {
@@ -1,6 +1,8 @@
1
1
  "use client";
2
2
  import React, { useState, useEffect, useMemo } from "react";
3
3
  import { Icon } from "@iconify/react";
4
+ import { exportToExcel } from "react-json-to-excel";
5
+ import dayjs from "dayjs";
4
6
  import { Form, Button, Dropdown } from "../../components";
5
7
  import { Action, type ActionProps } from "./action";
6
8
 
@@ -270,7 +272,12 @@ export const Table: TableComponentProps = ({
270
272
  />
271
273
  <Button
272
274
  options={{ variant: "primary", width: "fit" }}
273
- onClick={() => {}}
275
+ onClick={() => {
276
+ exportToExcel(
277
+ filteredData,
278
+ `${title}-data_${dayjs().format("YYYY-MM-DD_HH-mm-ss")}`
279
+ );
280
+ }}
274
281
  >
275
282
  Export
276
283
  </Button>