Commit 41da52d6 by Leo Liu Junyi Committed by GitHub

Fix Switch state inconsistency for Scheduled Trigger (#2221)

* 修复定时关闭时Switch显示不同步

* 优化写法
parent 446d9cb1
...@@ -187,7 +187,7 @@ const ScheduledTriggerConfig = ({ ...@@ -187,7 +187,7 @@ const ScheduledTriggerConfig = ({
cronField: [CronJobTypeEnum.interval, 24 / cronField.hour.length, 0] cronField: [CronJobTypeEnum.interval, 24 / cronField.hour.length, 0]
}; };
}, [cronString]); }, [cronString]);
const isOpenSchedule = cronConfig?.isOpen; const isOpenSchedule = cronConfig?.isOpen ?? false;
const cronField = (cronConfig?.cronField || defaultValue) as CronFieldType; const cronField = (cronConfig?.cronField || defaultValue) as CronFieldType;
const cronConfig2cronString = useCallback( const cronConfig2cronString = useCallback(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment