@popmenu/table 0.98.0 → 0.99.0
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.
- package/build/index.es.js +9 -2
- package/build/index.es.js.map +1 -1
- package/build/index.js +9 -2
- package/build/index.js.map +1 -1
- package/package.json +2 -2
package/build/index.es.js
CHANGED
|
@@ -1452,10 +1452,17 @@ var useStagedColumnFilters = function (selectedColumnFilters) {
|
|
|
1452
1452
|
return selectedColumnFilters.reduce(function (acc, _a) {
|
|
1453
1453
|
var id = _a.id, value = _a.value;
|
|
1454
1454
|
if (acc.has(id)) {
|
|
1455
|
-
acc.get(id)
|
|
1455
|
+
var existingValue = acc.get(id);
|
|
1456
|
+
// If the existing value is a string, convert it to an array and add the new value
|
|
1457
|
+
if (typeof existingValue === 'string') {
|
|
1458
|
+
acc.set(id, [existingValue, value]);
|
|
1459
|
+
}
|
|
1460
|
+
else {
|
|
1461
|
+
existingValue.push(value);
|
|
1462
|
+
}
|
|
1456
1463
|
}
|
|
1457
1464
|
else {
|
|
1458
|
-
acc.set(id,
|
|
1465
|
+
acc.set(id, value);
|
|
1459
1466
|
}
|
|
1460
1467
|
return acc;
|
|
1461
1468
|
}, new Map());
|