@ssplib/react-components 0.0.129 → 0.0.131

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.
@@ -214,15 +214,14 @@ function Table({ columns, fetchFunc, emptyMsg = {
214
214
  });
215
215
  Object.keys(obj).forEach((objKey) => {
216
216
  const values = [];
217
- let include = true;
218
217
  obj[objKey].forEach((x) => {
218
+ let include = true;
219
219
  originalKeys.forEach((k) => {
220
220
  //verificar se pode incluir
221
221
  if (csvExcludeValidate(k, x[k])) {
222
222
  include = false;
223
223
  }
224
224
  });
225
- console.log(include);
226
225
  if (include) {
227
226
  const value = keys
228
227
  .map((k) => {
@@ -242,8 +241,8 @@ function Table({ columns, fetchFunc, emptyMsg = {
242
241
  }
243
242
  });
244
243
  const csvData = '\uFEFF' + header + values.join('\n');
245
- if (include)
246
- zip.file(`${objKey}.csv`, csvData);
244
+ if (values.length > 0)
245
+ zip.file(`${objKey.normalize('NFD').replace(/[\u0300-\u036f]/g, '')}.csv`, csvData);
247
246
  });
248
247
  // // download
249
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.129",
3
+ "version": "0.0.131",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",