rusackas commented on code in PR #43498:
URL: https://github.com/apache/superset/pull/43498#discussion_r3859188448
##########
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:
Good point — fixed. `disabled` now only gets forced to `true` when the modal
isn't draggable at all; a draggable modal still honors an explicit
`draggableConfig.disabled: true` opt-out. Added tests for both cases.
--
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]