@ssplib/react-components 0.0.146 → 0.0.148

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.
@@ -313,7 +313,7 @@ function Table({ columns, fetchFunc, emptyMsg = {
313
313
  if (k === 'rlEventoData')
314
314
  return `${x[k][0]['DT_INICIO']} - ${x[k][0]['HR_INICIO']}`;
315
315
  if (typeof x[k] === 'string') {
316
- let item = csvUpper ? x[k].toUpperCase() : x[k];
316
+ let item = csvUpper && !csvExcludeUpper.includes(k) ? x[k].toUpperCase() : x[k];
317
317
  item = normalize ? item.normalize('NFD').replace(/[\u0300-\u036f]/g, '') : item;
318
318
  return removeQuotes ? `${item}` : `"${item}"`;
319
319
  }
@@ -413,18 +413,15 @@ function Table({ columns, fetchFunc, emptyMsg = {
413
413
  } //
414
414
  else if (type === 'items') {
415
415
  rawList = rawList
416
- .filter((x) => x[keyName].toLowerCase() === customValue)
416
+ .filter((x) => x[keyName].toLowerCase().includes(customValue))
417
417
  .sort((a, b) => {
418
418
  const aValue = a[keyName];
419
419
  const bValue = b[keyName];
420
420
  const valueA = typeof aValue === 'number' ? aValue : aValue.toLowerCase();
421
421
  const valueB = typeof bValue === 'number' ? bValue : bValue.toLowerCase();
422
- // const aRKey = a[referencekey ?? '']
423
- // const bRKey = b[referencekey ?? '']
424
- // if (valueA === customValue) console.log(valueA, valueB, aRKey, bRKey)
425
- if (valueA === customValue)
422
+ if (valueA.includes(customValue))
426
423
  return -1;
427
- if (valueB === customValue)
424
+ if (valueB.includes(customValue))
428
425
  return 1;
429
426
  if (valueA < valueB) {
430
427
  return -1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssplib/react-components",
3
- "version": "0.0.146",
3
+ "version": "0.0.148",
4
4
  "description": "SSP React Components",
5
5
  "main": "index.js",
6
6
  "author": "Pedro Henrique <sr.hudrick@gmail.com>",