Skip to content

Commit

Permalink
Add markerColourProperty key to LayersControl
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Hart committed Mar 3, 2017
1 parent 565d8c2 commit 5d7656a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion webapp/src/js/components/Map/MapActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,8 @@ let MapActions = React.createClass({
);
}

// NB: Setting the key to markerColourProperty avoids zombie layer options
// appearing in the layerControl whenever the markerColourProperty changes.
map = (
<Map
center={center}
Expand All @@ -494,7 +496,7 @@ let MapActions = React.createClass({
onChange={this.handleChangeMap}
zoom={zoom}
>
<LayersControl>
<LayersControl key={markerColourProperty}>
{baseLayerComponent}
{overlayLayerComponent}
{markersLayerComponent}
Expand Down

0 comments on commit 5d7656a

Please sign in to comment.