mikebridge commented on code in PR #45649:
URL: https://github.com/apache/superset/pull/45649#discussion_r4384977185
##########
superset-frontend/src/features/semanticLayers/SemanticLayerModal.tsx:
##########
@@ -333,32 +370,41 @@ export default function SemanticLayerModal({
};
const handleCreate = async () => {
+ saveRequestRef.current += 1;
+ const request = saveRequestRef.current;
setSaving(true);
try {
if (isEditMode && semanticLayerUuid) {
await SupersetClient.put({
endpoint: `/api/v1/semantic_layer/${semanticLayerUuid}`,
jsonPayload: { name, configuration: formData },
});
+ if (request !== saveRequestRef.current) return;
Review Comment:
Thanks, fixed in 74322a472a. If an edit PUT succeeds after Cancel, the modal
now calls a new `onUpdated` callback, and `DatabaseList` refreshes once the
update has committed. The stale guard still stops the closed modal from showing
a success toast or closing a newer session. A delayed-PUT test (Save → Cancel →
success) failed before the fix and passes now.
--
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]