fix: the fields for trigger checking

This commit is contained in:
jialin
2025-04-03 18:08:43 +08:00
parent 939f46c7e6
commit b6136a092d
22 changed files with 226 additions and 73 deletions
@@ -162,14 +162,18 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
const handleSelectorOnBlur = () => {
const workerSelector = form.getFieldValue('worker_selector');
onValuesChange?.({}, form.getFieldsValue());
// check if all keys have values
const hasEmptyValue = _.some(_.keys(workerSelector), (k: string) => {
return !workerSelector[k];
});
if (!hasEmptyValue) {
onValuesChange?.({}, form.getFieldsValue());
}
};
const handleBackendVersionOnBlur = () => {
const backendVersion = form.getFieldValue('backend_version');
if (backendVersion) {
onValuesChange?.({}, form.getFieldsValue());
}
onValuesChange?.({}, form.getFieldsValue());
};
const collapseItems = useMemo(() => {