Set next active only when location is selected
This commit is contained in:
parent
5bef4efe36
commit
ef3d0e4d7e
3 changed files with 10 additions and 5 deletions
|
@ -13,7 +13,7 @@ export default function LocationStep(props) {
|
|||
)
|
||||
|
||||
const locationSelectionPanel = (
|
||||
<LocationSelectorMap updateFilterState={props.updateFilterState} />
|
||||
<LocationSelectorMap {...props} />
|
||||
)
|
||||
|
||||
return (
|
||||
|
|
|
@ -13,7 +13,8 @@ function LocationMarker(props) {
|
|||
click(e) {
|
||||
const newPosition = e.latlng;
|
||||
setPosition(newPosition);
|
||||
props.updateCoordinateFilter({"latitude": newPosition.lat, "longitude": newPosition.lng});
|
||||
props.updateFilterState({"latitude": newPosition.lat, "longitude": newPosition.lng});
|
||||
props.setNextDisabled(false);
|
||||
},
|
||||
})
|
||||
|
||||
|
@ -41,7 +42,7 @@ export default function Map(props) {
|
|||
attribution='© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
|
||||
/>
|
||||
<LocationMarker updateCoordinateFilter={props.updateFilterState} />
|
||||
<LocationMarker {...props} />
|
||||
<FitNewZealandBounds />
|
||||
</MapContainer>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue