Skip to content

Commit

Permalink
Prevent form submit in ForecastChooser to refresh the browser
Browse files Browse the repository at this point in the history
  • Loading branch information
seladb committed Jun 18, 2021
1 parent fe8fb6d commit 7480fa7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/ForecastChooser.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ const ForecastChooser = (props) => {
return true;
}

const forecastPropsSelected = () => {
const forecastPropsSelected = (event) => {
event.preventDefault();
let forecastProps = {
daysBackwards: calculateDays(forecastBasedOnLastInput.current.value, forecastBasedOnLastSelect.current.value),
daysForward: calculateDays(forecastForwardInput.current.value, forecastForwardSelect.current.value),
Expand Down

0 comments on commit 7480fa7

Please sign in to comment.