@ssplib/react-components 0.0.128 → 0.0.130

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.
@@ -14,8 +14,8 @@ export declare function Table({ columns, fetchFunc, emptyMsg, dataPath, tableNam
14
14
  csvShowAllButton?: boolean;
15
15
  csvAllButtonTitle?: string;
16
16
  csvButtonTitle?: string;
17
- csvZipFileNamesKey: string;
18
- generateCsvZip: boolean;
17
+ csvZipFileNamesKey?: string;
18
+ generateCsvZip?: boolean;
19
19
  csvExcludeValidate?: (key: string, value: string | number) => boolean;
20
20
  csvCustomKeyNames?: {
21
21
  [key: string]: string;
@@ -241,7 +241,8 @@ function Table({ columns, fetchFunc, emptyMsg = {
241
241
  }
242
242
  });
243
243
  const csvData = '\uFEFF' + header + values.join('\n');
244
- zip.file(`${objKey}.csv`, csvData);
244
+ if (values.length > 0)
245
+ zip.file(`${objKey}.csv`, csvData);
245
246
  });
246
247
  // // download
247
248
  var link = window.document.createElement('a');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.128",
3
+ "version": "0.0.130",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",