fix comparison view
1 changed file+6−1
web-ui/src/components/dataset/TimeseriesView.tsxmodified+6−1View file
@@ -125,6 +125,11 @@ const TimeseriesView: React.FC<TimeseriesViewProps> = ({
125125 return;
126126 }
127127
128+ // When a reconstruction is selected for comparison, switch from "all" to channel 0
129+ if (selectedChannel === "all") {
130+ setSelectedChannel(0);
131+ }
132+
128133 const initClient = async () => {
129134 try {
130135 const client = await TimeseriesDataClient.create(
@@ -140,7 +145,7 @@ const TimeseriesView: React.FC<TimeseriesViewProps> = ({
140145 };
141146
142147 initClient();
143- }, [reconstructedInfo]);
148+ }, [reconstructedInfo, selectedChannel]);
144149
145150 // Load reconstructed data for current range
146151 useEffect(() => {