@overmap-ai/core 1.0.48-component-type-views.2 → 1.0.48-component-type-views.3
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/overmap-core.js
CHANGED
|
@@ -1641,15 +1641,15 @@ const selectComponentTypeFromComponents = (state) => {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
return ret;
|
|
1643
1643
|
};
|
|
1644
|
+
let prevComponentsByType = null;
|
|
1644
1645
|
const selectComponentsByType = (componentTypeId) => (state) => {
|
|
1645
1646
|
const components = state.componentReducer.components;
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
}
|
|
1647
|
+
if (!prevComponentsByType) {
|
|
1648
|
+
prevComponentsByType = Object.values(components).filter(
|
|
1649
|
+
(component) => component.component_type === componentTypeId
|
|
1650
|
+
);
|
|
1651
1651
|
}
|
|
1652
|
-
return
|
|
1652
|
+
return prevComponentsByType;
|
|
1653
1653
|
};
|
|
1654
1654
|
const selectNumberOfComponentsOfComponentType = (componentTypeId) => (state) => {
|
|
1655
1655
|
var _a2;
|