Make Popconfirm work without any html element


Topic: Make Popconfirm work without any html element

shellxsoftware asked 3 years ago

Basically when you open a popconfirm you need the HTML element which is opening it (usually a button). But the parameter cannot be nulled: what if we want to open a popconfirm modal without any HTML element ? So we can open one on the fly without event.


Arkadiusz Idzikowski staff commented 3 years ago

@shellxsoftware It might be a good idea to make the target parameter optional for the modal display mode. We will discuss that with our design team and consider adding to the library in the near future.


shellxsoftware commented 3 years ago

any news?any news?any news?


Mbanolas commented 3 years ago

An alternative could be to add the code of popconfirm, add class d-none to hide it and then to launch a click event https://mdbootstrap.com/snippets/standard/miguel_angel_banolas/3596902#js-tab-view


Arkadiusz Idzikowski staff answered 3 years ago

@shellxsoftware This problem was fixed in v1.6.0, the target parameter is now optional in modal mode, you should be able to open the popconfirm using this syntax:

open(component, undefined, config)

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: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB5 1.3.0
  • Device: --
  • Browser: --
  • OS: --
  • Provided sample code: No
  • Provided link: No