diff --git a/frontend/src/components/Stepper.js b/frontend/src/components/Stepper.js index fff836c..b44aedb 100644 --- a/frontend/src/components/Stepper.js +++ b/frontend/src/components/Stepper.js @@ -40,6 +40,7 @@ export default function StepperWizard(props) { const handleReset = () => { setActiveStep(0); setNextDisabled(true); + props.resetFilterState() }; let CurrentStep = activeStep >= steps.length ? steps[steps.length - 1].component : steps[activeStep].component; diff --git a/frontend/src/pages/MainPage.js b/frontend/src/pages/MainPage.js index a39ce39..bc5f5a6 100644 --- a/frontend/src/pages/MainPage.js +++ b/frontend/src/pages/MainPage.js @@ -16,6 +16,7 @@ export default class MainPage extends React.Component { } this.updateFilterState = this.updateFilterState.bind(this); + this.resetFilterState = this.resetFilterState.bind(this); } updatePlants() { @@ -33,6 +34,10 @@ export default class MainPage extends React.Component { this.updatePlants() } + resetFilterState() { + this.setState({ filters: {} }) + } + componentDidMount() { this.updatePlants() } @@ -41,7 +46,11 @@ export default class MainPage extends React.Component { return (
- + ) }