This is an automated email from the ASF dual-hosted git repository.
bbovenzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new c438e2aa66d Fix XCom edit modal value not repopulating on reopen.
(#62798)
c438e2aa66d is described below
commit c438e2aa66d66c645ba2644d6ca1e26838632672
Author: Arbaaz Ahmed <[email protected]>
AuthorDate: Thu Mar 19 00:15:27 2026 +0530
Fix XCom edit modal value not repopulating on reopen. (#62798)
* Fix XCom edit modal value not repopulating on reopen
* Fix XCom modal value not repopulating when reopened
* Applied the requested changes
* Required changes
Co-authored-by: Pierre Jeambrun <[email protected]>
---------
Co-authored-by: Pierre Jeambrun <[email protected]>
---
airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx
b/airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx
index b16b8161f66..4b4e1f67284 100644
--- a/airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx
+++ b/airflow-core/src/airflow/ui/src/pages/XCom/XComModal.tsx
@@ -67,12 +67,12 @@ const XComModal = ({ dagId, isOpen, mapIndex, mode,
onClose, runId, taskId, xcom
// Populate form when editing
useEffect(() => {
- if (isEditMode && data?.value !== undefined) {
+ if (isOpen && isEditMode && data) {
const val = data.value;
setValue(typeof val === "string" ? val : JSON.stringify(val, undefined,
2));
}
- }, [data, isEditMode]);
+ }, [data, isEditMode, isOpen]);
// Reset form when modal closes
useEffect(() => {