@local-civics/hub-ui 0.1.175 → 0.1.176
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/dist/index.js +13 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5613,10 +5613,21 @@ const PathwayCard = (props) => {
|
|
|
5613
5613
|
return obj;
|
|
5614
5614
|
}
|
|
5615
5615
|
);
|
|
5616
|
+
React__namespace.useEffect(() => {
|
|
5617
|
+
setFilters((prev) => {
|
|
5618
|
+
const next = {};
|
|
5619
|
+
categoryIds.forEach((id) => {
|
|
5620
|
+
var _a2, _b2;
|
|
5621
|
+
next[id] = {
|
|
5622
|
+
id,
|
|
5623
|
+
isActive: (_b2 = (_a2 = prev[id]) == null ? void 0 : _a2.isActive) != null ? _b2 : false
|
|
5624
|
+
};
|
|
5625
|
+
});
|
|
5626
|
+
return next;
|
|
5627
|
+
});
|
|
5628
|
+
}, [categoryIds]);
|
|
5616
5629
|
const toggleFilter = (id) => {
|
|
5617
5630
|
setFilters((prev) => {
|
|
5618
|
-
if (!prev[id])
|
|
5619
|
-
return prev;
|
|
5620
5631
|
return __spreadProps$1(__spreadValues$2({}, prev), {
|
|
5621
5632
|
[id]: __spreadProps$1(__spreadValues$2({}, prev[id]), {
|
|
5622
5633
|
isActive: !prev[id].isActive
|