docs for modal options


Topic: docs for modal options

japan pro premium priority asked 6 years ago

Hi, can you please share a link to docs for modal options when opening modal using MDBModalService as described here https://mdbootstrap.com/docs/angular/modals/basic/#customize-modal ? I haven't found it anywhere and I've been specifically struggling with focus:true option. If true, I suppose it should focus the modal when opened, however that doesn't work. I need to focus the modal manually, otherwise hitting Enter or Space keys interact with the parent component (from which the opening was triggered), the open button stays focused and another instances of the same modal are being opened and stacked on the page. Thanks ! jp


Damian Gemza staff answered 5 years ago

Dear @japan

The problem with not working focus config property on the dynamic modal will be resolved with the next version of MDB Angular.

Best Regards,

Damian


japan pro premium priority commented 5 years ago

Hi @Damian Gemza , thanks for good news, however that's just a part of my question. The other part - can you please provide some docs for events (onOpen), (onClose) for dynamic modals as mentioned above? Or is there any workaround possibility for listening to these events ?


Arkadiusz Idzikowski staff commented 5 years ago

We will update the modal documentation (and code if it will be necessary) and let you know when it will be available.


Damian Gemza staff answered 6 years ago

Dear @japan

The focus option should work as you're describing it. But it seems that it is not working for dynamic modals - there's a bug, we have to resolve it on our side.

For now, please use the static modal if it's possible, or set the focus to the modal manually with javascript.

Best Regards,

Damian


japan pro premium priority answered 6 years ago

Hi @Damian Gemza, thanks for bug confirmation. Yes, there's a workaround for focus via javascript, so I'm gonna use it until you fix this. However I'm still missing any basic documentation regarding modal options for dynamic modals. Is there any? For instance, how am I supposed to use (onOpen), (onClose) etc. events? For now, I'm using angular component's OnDestroy, but it's far from ideal. Thanks


Damian Gemza staff commented 6 years ago

You're right. Our Modal documentation lacks on this part. We'll add some examples on how to use those outputs on dynamic modal!

Best Regards,

Damian


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Resolved

Specification of the issue
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: 7.5.4
  • Device: all
  • Browser: all
  • OS: all
  • Provided sample code: No
  • Provided link: Yes
Tags