bbovenzi commented on code in PR #26457:
URL: https://github.com/apache/airflow/pull/26457#discussion_r980509217
##########
airflow/www/static/js/dag/details/taskInstance/index.tsx:
##########
@@ -90,6 +92,8 @@ const TaskInstance = ({
if (!group || !run || !instance) return null;
+ const updateTaskInstanceNotesCallable = (newNotes: string) => {
instance.notes = newNotes; };
Review Comment:
We shouldn't mutate instance like this.
Let's keep notes as a state variable with ```const [notes, setNotes] =
useState(instance.notes || '');```
And then here we can call `setNotes(newNotes);`
##########
airflow/www/static/js/dag/details/taskInstance/index.tsx:
##########
@@ -90,6 +92,8 @@ const TaskInstance = ({
if (!group || !run || !instance) return null;
+ const updateTaskInstanceNotesCallable = (newNotes: string) => {
instance.notes = newNotes; };
Review Comment:
We shouldn't mutate instance like this.
Let's keep notes as a state variable with
```const [notes, setNotes] = useState(instance.notes || '');```
And then here we can call `setNotes(newNotes);`
--
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]