@ssplib/react-components 0.0.147 → 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.
|
@@ -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()
|
|
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
|
-
|
|
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
|
|
424
|
+
if (valueB.includes(customValue))
|
|
428
425
|
return 1;
|
|
429
426
|
if (valueA < valueB) {
|
|
430
427
|
return -1;
|