Popconfirm added with javascript doesn't show on first


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

max rioux pro premium priority asked 1 months 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.)

https://mdbootstrap.com/snippets/standard/max_rioux/3974653#js-tab-view


max rioux pro premium priority answered 1 months 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.

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: Yes
  • Technology: MDB Standard
  • MDB Version: MDB5 4.0.0
  • Device: Computer
  • Browser: Firefox
  • OS: Windows 10
  • Provided sample code: No
  • Provided link: Yes
Tags