pierrejeambrun commented on code in PR #67253:
URL: https://github.com/apache/airflow/pull/67253#discussion_r3349159125
##########
airflow-core/src/airflow/ui/src/components/TriggerDag/TriggerDAGForm.tsx:
##########
@@ -73,40 +73,32 @@ const TriggerDAGForm = ({
const initialParamsDict = useDagParams(dagId, open);
const { conf, initialParamDict, setConf, setInitialParamDict } =
useParamStore();
const [unpause, setUnpause] = useState(true);
- const [hasAppliedPrefill, setHasAppliedPrefill] = useState(false);
const { mutate: togglePause } = useTogglePause({ dagId });
+ const defaultValues = {
+ conf: "",
+ dagRunId: "",
+ dataIntervalEnd: "",
+ dataIntervalMode: "auto",
+ dataIntervalStart: "",
+ // Default logical date to now, show it in the selected timezone.
+ // For partitioned Dags, logical date is not applicable.
+ logicalDate: isPartitioned ? "" : dayjs().format(DEFAULT_DATETIME_FORMAT),
Review Comment:
This will keep refreshing the`defaultValues` on every renders (it's changing
every seconds, and can't be memoized by react-compiler)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]