Load previous soil variant selection during step navigation
This commit is contained in:
parent
6303bca92e
commit
2deb3faec0
1 changed files with 7 additions and 1 deletions
|
@ -20,9 +20,15 @@ const MESIC_SOIL_DESCRIPTION = (<p>
|
||||||
</p>);
|
</p>);
|
||||||
|
|
||||||
export default function SoilSelector(props) {
|
export default function SoilSelector(props) {
|
||||||
const [value, setValue] = React.useState('');
|
const [value, setValue] = React.useState(props.filters.soilVariant);
|
||||||
const [helperText, setHelperText] = React.useState('Please select your soil variant from the options above.');
|
const [helperText, setHelperText] = React.useState('Please select your soil variant from the options above.');
|
||||||
|
|
||||||
|
React.useEffect(() => {
|
||||||
|
if (props.filters.soilVariant) {
|
||||||
|
props.setNextDisabled(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
const handleRadioChange = (event) => {
|
const handleRadioChange = (event) => {
|
||||||
const soilVariantSelection = event.target.value;
|
const soilVariantSelection = event.target.value;
|
||||||
setValue(soilVariantSelection);
|
setValue(soilVariantSelection);
|
||||||
|
|
Loading…
Reference in a new issue