Popconfirm Documentation


Topic: Popconfirm Documentation

Dave Moniz pro premium priority asked 10 months 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 pro premium priority commented 10 months 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 10 months 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 pro premium priority commented 10 months ago

Works great, thanks


Dave Moniz pro premium priority answered 9 months 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
  • User: Pro
  • Premium support: Yes
  • Technology: MDB Angular
  • MDB Version: MDB5 1.0.0-beta5
  • Device: PC
  • Browser: Google Chrome
  • OS: Arch Linux
  • Provided sample code: No
  • Provided link: No