Skip to content

Commit

Permalink
fix feature layer toggling bug (#2557)
Browse files Browse the repository at this point in the history
* fix feature layer toggling bug

* remove unused import

* simplify input logic and revert ui behavior
  • Loading branch information
CollinBeczak authored Feb 18, 2025
1 parent 5557406 commit 12cef90
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/components/EnhancedMap/LayerToggle/LayerToggle.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import _clone from "lodash/clone";
import _filter from "lodash/filter";
import _isEmpty from "lodash/isEmpty";
import _map from "lodash/map";
import _noop from "lodash/noop";
import _sortBy from "lodash/sortBy";
import PropTypes from "prop-types";
import { Component, Fragment } from "react";
Expand Down Expand Up @@ -279,16 +278,14 @@ const SimpleLayerToggle = (props) => {
"mr-my-2 mr-flex mr-items-center mr-leading-none",
props.toggleClassName,
)}
onClick={props.toggleLayerActive}
>
<input
id={props.layerLabel}
type="checkbox"
className="mr-checkbox-toggle"
checked={props.isLayerActive}
onChange={_noop}
/>
<label htmlFor={props.layerLabel} className="mr-ml-3 mr-text-orange">
<label className="mr-text-orange mr-cursor-pointer">
<input
type="checkbox"
className="mr-checkbox-toggle mr-mr-3"
checked={props.isLayerActive}
onChange={props.toggleLayerActive}
/>
{props.layerLabel}
</label>
</div>
Expand Down

0 comments on commit 12cef90

Please sign in to comment.