fix: 🐛 Dropdown not updating when selecting segment (#1675)
Observe selectedSegmentation changes to refresh segment list ✅ Closes: #1669
This commit is contained in:
parent
561911056a
commit
20e366ffbd
@ -130,7 +130,7 @@ const SegmentationPanel = ({
|
|||||||
segmentList: [],
|
segmentList: [],
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}, [studies, viewports, activeIndex, getLabelmapList, getSegmentList]);
|
}, [studies, viewports, activeIndex, getLabelmapList, getSegmentList, state.selectedSegmentation]);
|
||||||
|
|
||||||
/* Handle open/closed panel behaviour */
|
/* Handle open/closed panel behaviour */
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -424,11 +424,7 @@ const SegmentationPanel = ({
|
|||||||
<h3>Segmentations</h3>
|
<h3>Segmentations</h3>
|
||||||
<div className="segmentations">
|
<div className="segmentations">
|
||||||
<SegmentationSelect
|
<SegmentationSelect
|
||||||
value={
|
value={state.labelmapList.find(i => i.value === state.selectedSegmentation)}
|
||||||
state.labelmapList.find(
|
|
||||||
i => i.value === state.selectedSegmentation
|
|
||||||
) || null
|
|
||||||
}
|
|
||||||
formatOptionLabel={SegmentationItem}
|
formatOptionLabel={SegmentationItem}
|
||||||
options={state.labelmapList}
|
options={state.labelmapList}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user