Topic: Popconfirm added with javascript doesn't show on first click

max rioux priority asked 2 years ago

I'm creating rows on the fly with javascript, in them there is a delete button, I want the delete button to use a popconfirm.

Expected behavior

The popconfirm show up everytime I click on the button

Actual behavior

The popconfirm doesn't show on the first click but show on every others even if the console.log is triggered as expected.

Resources (screenshots, code snippets etc.)

max rioux priority answered 2 years ago

Okay, I solved it. It was a misunderstood of my part. I thought new mdb.Popconfirm(popconfirmElement); was to make the popconfirm show but it is adding the event. So I just used it once when creating the popconfirm and removed my custom click event.

Please insert min. 20 characters.


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



Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.0.0
  • Device: Computer
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes