Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature to disableDialog on Modals #6691

Open
tophboogie opened this issue Sep 13, 2023 · 0 comments
Open

Feature to disableDialog on Modals #6691

tophboogie opened this issue Sep 13, 2023 · 0 comments

Comments

@tophboogie
Copy link

tophboogie commented Sep 13, 2023

Is your feature request related to a problem? Please describe

I want to add custom functionality to the Bootstrap Modal Dialog component in order to make the modal draggable. I can easily do this by using the <Modal.Dialog> component, but the Modal component already adds this element in! It would be great if there was a disableDialog property on the Modal component to simplify this.

Describe the solution you'd like

Something like this seems appropriate, where I can disableDialog on the component and then use <Modal.Dialog> directly.

<Modal show={modal} onHide={closeModal} disableDialog> <Modal.Dialog className='position-absolute' style={{ left: leftValue, top: topValue }}> <Modal.Header closeButton onMouseDown={handleMouseDown} onMouseUp={handleMouseUp}> <Modal.Title>{title}</Modal.Title> </Modal.Header> <Modal.Body> ... modal content </Modal.Body> </Modal>

Describe alternatives you've considered

I have tried using the dialogAs property to pass a custom <Modal.Dialog> component, but I can't figure out how to pass the properties using this method and it seems simpler to use the <Modal.Dialog> as JSX directly inline.

For Example:
<Modal show={modal} onHide={closeModal} dialogAs={() => <Modal.Dialog className='position-absolute' style={{ left: leftValue, top: topValue }}>{children}</Modal.Dialog>}> <Modal.Header closeButton onMouseDown={handleMouseDown} onMouseUp={handleMouseUp}> <Modal.Title>{title}</Modal.Title> </Modal.Header> <Modal.Body> ... modal content </Modal.Body> </Modal>

Additional context

No response

@tophboogie tophboogie changed the title Feature Feature to disableDialog on Modals Sep 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant