Skip to content

Commit b607893

Browse files
authored
Merge pull request #180 from HSLdevcom/fix_unresponsive_checkboxes
AB#79864 fix unresponsive checkboxes on map view
2 parents be66eac + 4cddfaf commit b607893

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

app/components/Map.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ const MapComponent = ({
3030
return () => newMap.remove();
3131
}, []);
3232

33+
useEffect(() => {
34+
if (!map) return;
35+
map.setStyle(style);
36+
}, [map, style]);
37+
3338
useEffect(() => {
3439
if (!map) {
3540
return () => {};
@@ -50,7 +55,8 @@ const MapComponent = ({
5055
map.off("zoomend", onChange);
5156
map.off("moveend", onChange);
5257
};
53-
}, [map]);
58+
}, [map, updateViewport]);
59+
5460
return (
5561
<div ref={mapContainerRef} style={{width: "100%", height: "100%"}}>
5662
<SelectionMarker

0 commit comments

Comments
 (0)