Topic: Popconfirm Documentation

Dave Moniz priority asked 3 years ago


There's several problems with the documentation on the Popconfirm page

In step 1 you show the close() and confirm() methods in the HTML but they're not defined in the TS and they need to be (close(): void { this.popconfirmRef.close(); })

In step 2 you say it's invoked by the show() method but it's actually the open() method

At no point do you clearly explain (with examples) how to correctly hook into the onClose and onConfirm events - this renders the whole component useless.


Dave Moniz priority commented 3 years ago

I ended up passing a VoidFunction through the data option in the config and then calling it in the confrim() method. Got the job done but I'm hoping this was not the intended use case.


Arkadiusz Idzikowski staff answered 3 years ago


Thank you for reporting these problems, we will update the documentation page and add more information about the events.

The onClose and onConfirm works in the same way as onClose in modals. Those observables are part of popconfirmRef:

this.popconfirmRef.onClose.subscribe(() => console.log('close'));

Dave Moniz priority commented 3 years ago

Works great, thanks


Dave Moniz priority answered 3 years ago


Very meaningful updates to the documentation, well done!

Closing now.


FREE CONSULTATION

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

Status

Closed

Specification of the issue

  • ForumUser: Priority
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 1.0.0-beta5
  • Device: PC
  • Browser: Google Chrome
  • OS: Arch Linux
  • Provided sample code: Yes
  • Provided link: No