This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch live-edits
in repository https://gitbox.apache.org/repos/asf/superset.git

commit e1b2206ff0206e8f2af46b7e72b29d6019f669ff
Author: Evan Rusackas <[email protected]>
AuthorDate: Thu Jan 8 17:17:58 2026 -0800

    fix(dashboard): fix race condition in EditableTitle controlled mode
    
    The second useEffect was calling onEditingChange(false) before the
    controlled mode sync completed, causing the parent to reset isEditingTitle
    back to false. Now we skip notifying the parent during the sync period.
    
    🤖 Generated with [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude Opus 4.5 <[email protected]>
---
 .../superset-ui-core/src/components/EditableTitle/index.tsx       | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx
 
b/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx
index c82bcef0d15..23a85cb3818 100644
--- 
a/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx
+++ 
b/superset-frontend/packages/superset-ui-core/src/components/EditableTitle/index.tsx
@@ -139,8 +139,12 @@ export function EditableTitle({
         textArea.scrollTop = textArea.scrollHeight;
       }
     }
-    onEditingChange?.(isEditing);
-  }, [isEditing, onEditingChange]);
+    // Don't notify parent during controlled mode sync
+    // (when editing prop is true but local state hasn't caught up yet)
+    if (!(editing && !isEditing)) {
+      onEditingChange?.(isEditing);
+    }
+  }, [isEditing, editing, onEditingChange]);
 
   function handleClick() {
     if (!canEdit || isEditing) return;

Reply via email to