bbovenzi commented on code in PR #53307:
URL: https://github.com/apache/airflow/pull/53307#discussion_r2205376868
##########
airflow-core/src/airflow/ui/src/pages/TaskInstance/Header.tsx:
##########
@@ -65,6 +65,10 @@ export const Header = ({
const [note, setNote] = useState<string | null>(taskInstance.note);
+ useEffect(() => {
+ setNote(taskInstance.note ?? "");
Review Comment:
We should always try to avoid useEffects when possible, especially when they
update the state. Because right now this can cause an infinite loop of updating
the state.
Let's just update the state during `onConfirm` function call below.
--
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]