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

betodealmeida pushed a commit to branch sl-fixes
in repository https://gitbox.apache.org/repos/asf/superset.git

commit 839240ed77e3aee2c1935d0503747728a28dfcab
Author: Beto Dealmeida <[email protected]>
AuthorDate: Wed May 27 10:17:05 2026 -0400

    Fix SL edit
---
 .../features/semanticLayers/SemanticLayerModal.tsx    | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git 
a/superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx 
b/superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx
index 0193f296488..63ac5487806 100644
--- a/superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx
+++ b/superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx
@@ -261,8 +261,13 @@ export default function SemanticLayerModal({
     }
   };
 
+  // Edit mode skips the type-picker step. Gating on this prevents the brief
+  // flash of the Create modal's first step while the existing layer is being
+  // fetched.
+  const isTypeStep = step === 'type' && !isEditMode;
+
   const handleSave = () => {
-    if (step === 'type') {
+    if (isTypeStep) {
       handleStepAdvance();
     } else {
       // Trigger validation UI and submit only from explicit save action.
@@ -320,7 +325,7 @@ export default function SemanticLayerModal({
 
   const title = isEditMode
     ? t('Edit %s', selectedTypeName || t('Semantic Layer'))
-    : step === 'type'
+    : isTypeStep
       ? t('New Semantic Layer')
       : t('Configure %s', selectedTypeName);
 
@@ -331,18 +336,16 @@ export default function SemanticLayerModal({
       onSave={handleSave}
       title={title}
       icon={isEditMode ? <Icons.EditOutlined /> : <Icons.PlusOutlined />}
-      width={step === 'type' ? MODAL_STANDARD_WIDTH : MODAL_MEDIUM_WIDTH}
+      width={isTypeStep ? MODAL_STANDARD_WIDTH : MODAL_MEDIUM_WIDTH}
       saveDisabled={
-        step === 'type' ? !selectedType : saving || !name.trim() || hasErrors
-      }
-      saveText={
-        step === 'type' ? undefined : isEditMode ? t('Save') : t('Create')
+        isTypeStep ? !selectedType : saving || !name.trim() || hasErrors
       }
+      saveText={isTypeStep ? undefined : isEditMode ? t('Save') : t('Create')}
       saveLoading={saving}
       contentLoading={loading}
     >
       <ModalContent>
-        {step === 'type' ? (
+        {isTypeStep ? (
           <ModalFormField label={t('Type')}>
             <Select
               ariaLabel={t('Semantic layer type')}

Reply via email to