diff --git a/src/app/atoms/segmented-controls/SegmentedControls.jsx b/src/app/atoms/segmented-controls/SegmentedControls.jsx index 2faaf2b..1d54dd0 100644 --- a/src/app/atoms/segmented-controls/SegmentedControls.jsx +++ b/src/app/atoms/segmented-controls/SegmentedControls.jsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useState, useEffect } from 'react'; import PropTypes from 'prop-types'; import './SegmentedControls.scss'; @@ -17,6 +17,10 @@ function SegmentedControls({ onSelect(segmentIndex); } + useEffect(() => { + setSelect(selected); + }, [selected]); + return (