@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.js
CHANGED
|
@@ -1501,10 +1501,17 @@ var useStagedColumnFilters = function (selectedColumnFilters) {
|
|
|
1501
1501
|
return selectedColumnFilters.reduce(function (acc, _a) {
|
|
1502
1502
|
var id = _a.id, value = _a.value;
|
|
1503
1503
|
if (acc.has(id)) {
|
|
1504
|
-
acc.get(id)
|
|
1504
|
+
var existingValue = acc.get(id);
|
|
1505
|
+
// If the existing value is a string, convert it to an array and add the new value
|
|
1506
|
+
if (typeof existingValue === 'string') {
|
|
1507
|
+
acc.set(id, [existingValue, value]);
|
|
1508
|
+
}
|
|
1509
|
+
else {
|
|
1510
|
+
existingValue.push(value);
|
|
1511
|
+
}
|
|
1505
1512
|
}
|
|
1506
1513
|
else {
|
|
1507
|
-
acc.set(id,
|
|
1514
|
+
acc.set(id, value);
|
|
1508
1515
|
}
|
|
1509
1516
|
return acc;
|
|
1510
1517
|
}, new Map());
|