mikebridge commented on code in PR #45100:
URL: https://github.com/apache/superset/pull/45100#discussion_r4232438071


##########
superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx:
##########
@@ -82,6 +83,16 @@ export default function SemanticLayerModal({
   );
   const [formData, setFormData] = useState<Record<string, unknown>>({});
   const [saving, setSaving] = useState(false);
+  const [clearing, setClearing] = useState(false);
+  const [savedForm, setSavedForm] = useState<{
+    name: string;
+    configuration: Record<string, unknown>;
+  } | null>(null);
+  const clearRequestRef = useRef(0);
+  const dirty =

Review Comment:
   Good catch, thanks. In 7031d27912, the dirty check now compares against the 
saved configuration normalized with the same `const` and read-only `default` 
values the controls inject on mount. That's a small change in 
`SemanticLayerModal.tsx` only.
   
   A new test opens the editor for a stored configuration that lacks a 
defaulted read-only field. Without touching anything, Reload metadata stays 
enabled. A real configuration edit still marks the form dirty and disables it.
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to