sadpandajoe commented on code in PR #43498:
URL: https://github.com/apache/superset/pull/43498#discussion_r3858370483


##########
superset-frontend/packages/superset-ui-core/src/components/Modal/Modal.tsx:
##########
@@ -378,13 +365,17 @@ const CustomModal = ({
       modalRender={modal =>
         resizable || draggable ? (
           <Draggable
-            disabled={!draggable || dragDisabled}
             bounds={bounds ?? false}
             onStart={(event, uiData) => onDragStart(event, uiData)}
+            {...draggableConfig}
+            // These two props are derived from `draggable` and must stay
+            // authoritative, so they're applied after the spread to
+            // prevent callers from overriding them via `draggableConfig`.
+            disabled={!draggable}

Review Comment:
   This makes `draggableConfig.disabled` ineffective even though the exported 
configuration type still accepts it. Consumers that use it to temporarily lock 
a draggable modal will be able to drag it after this change; could the 
effective value preserve a caller's disabling opt-out while keeping the title 
handle enforced?



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