Dynamic modals y plugin mdb-draggable


Topic: Dynamic modals y plugin mdb-draggable

llopezj pro priority vip early access asked 10 months ago

Good evening, I am using modal windows in angular with mdbootstrap-pro, the modal window is invoked with the following code:

this.modalRef = this.modalService.show (CompraModalComponent, {backdrop: true, keyboard: true, focus: true, show: false, ignoreBackdropClick: false, class: 'modal-side modal-top-right', containerClass: 'right ', animated: true});

what i need is to use the mdb-draggable-9.0.0.tgz plugin with these modal windows being dynamically invoked. since I was trying it but it still doesn't work for me, since the modal's parent div are automatically generated when invoking the modalComponent.

How can I do it, to integrate the plugin with the modal windows invoked dynamically?

I am expecting your answers, thanks.

Cheers.


Arkadiusz Idzikowski staff commented 10 months ago

Please translate your question into English.


llopezj pro priority vip early access commented 10 months ago

is already translated.


Arkadiusz Idzikowski staff commented 10 months ago

Unfortunately it's not possible at the moment. The modal template is generated dynamically in this case and we need to find a way to dynamically initialize draggable on created elements. For now, you can try to add mdbDraggable directive to the element with class modal-content in the modal HTML template. But in some cases, it can cause problems with modal container.


Please insert min. 20 characters.
Status

Open

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: Angular
  • MDB Version: 9.0.0
  • Device: Lapto
  • Browser: Google Chrome
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: No