Update habitat selector to reset image/zone on habitat change
This commit is contained in:
parent
f92bb7290c
commit
01a3328ec2
1 changed files with 4 additions and 1 deletions
|
@ -48,6 +48,7 @@ export default function HabitatSelector(props) {
|
|||
// Sets the selected image radio, updates filter state for image and enable the next button
|
||||
setImageValue(imageId);
|
||||
props.updateFilterState({ "habitatImage": imageId });
|
||||
props.updateFilterState({ "zone": null });
|
||||
props.setNextDisabled(false);
|
||||
}
|
||||
|
||||
|
@ -55,6 +56,8 @@ export default function HabitatSelector(props) {
|
|||
// Retrieve and set the value of the radio button
|
||||
const habitatSelection = event.target.value;
|
||||
setValue(habitatSelection);
|
||||
setHabitatImage(null)
|
||||
|
||||
|
||||
// Set the image default selection if there is only one image variation available
|
||||
const habitatObject = habitatsMap[habitatSelection]
|
||||
|
|
Loading…
Reference in a new issue