Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Commit 85448a3

Browse files
xloypaypakevinlzw
authored andcommitted
should auto re-apply when options changed
1 parent df40c69 commit 85448a3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

frontend/src/pages/dashboard/components/DashboardTopPanel.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,18 @@ export const DashboardTopPanel: FC<DashboardTopPanelProps> = ({ projectId }) =>
150150
syncFourKeyMetrics(formValues);
151151
};
152152

153+
useEffect(() => {
154+
formValues.pipelines = formValues.pipelines.filter(pipeline =>
155+
pipelineOptions.some(
156+
option =>
157+
option.value === pipeline.value &&
158+
option.children?.some(childOption => childOption.value === pipeline.childValue)
159+
)
160+
);
161+
setFormValues(formValues);
162+
onApply(formValues);
163+
}, [pipelineOptions]);
164+
153165
// Auto sync related logic
154166
const [autoSyncPeriod, setAutoSyncPeriod] = useState<AutoSyncOption>(AUTO_SYNC_OPTIONS[0]);
155167
const [autoSyncJob, setAutoSyncJob] = useState<NodeJS.Timeout | null>(null);

0 commit comments

Comments
 (0)