Verified Commit 6245e2d3 authored by Florent Chehab's avatar Florent Chehab
Browse files

fix(PreviousExchangeTab): reset minor on real major change

parent 1c76b699
......@@ -44,11 +44,6 @@ function PreviousExchangesTab({
}) {
const classes = useStyles();
// Reset minors on majors change
useEffect(() => {
setMinor(undefinedVal);
}, [major]);
const displayMinorSelect = major !== undefinedVal;
let minors;
if (displayMinorSelect)
......@@ -195,6 +190,11 @@ export default () => {
const [major, setMajor] = useState(undefinedVal);
const [minor, setMinor] = useState(undefinedVal);
// Reset minors on majors change
useEffect(() => {
setMinor(undefinedVal);
}, [major]);
return (
<ConnectedComp
page={page}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment