primeng icon indicating copy to clipboard operation
primeng copied to clipboard

[ConfirmDialog] Add third, Cancel button

Open earshinov opened this issue 5 years ago • 2 comments

I'm submitting a ...

[x] feature request

Minimal reproduction of the problem with instructions

Currently ConfirmDialog only supports two buttons: Accept and Reject.

In several cases a third, Cancel button could be useful.

Take a look at options provided by WinAPI MessageBox function:

MB_ABORTRETRYIGNORE
MB_CANCELTRYCONTINUE
...
MB_YESNOCANCEL

It is impossible to implement scenarios covered by these options using PrimeNG's ConfirmDialog, because it is limited to two buttons.

To illustrate, if I need to ask the user about unsaved changes when they are about to leave the page, I would like to display some sort of a MB_YESNOCANCEL dialog:

Unsaved changes
----------------------------

Do you want to save changes?

         [Yes] [No] [Cancel]

I have prepared a draft implementation: https://stackblitz.com/edit/primeng-confirmdialog3

Please tell us about your environment:

  • Angular version: 7.2.8
  • PrimeNG version: 7.1.0
  • Browser: all
  • Language: TypeScript 3.3

earshinov avatar May 03 '19 18:05 earshinov

I second this request!

RobSchripsema avatar Jul 10 '19 23:07 RobSchripsema

I third this request, but for the Confirm Popup as well. We use the Confirm Popup a lot in our UI and have a situation where we need two confirm buttons and one cancel button - 'Save', 'Save New Revision', and 'Cancel'. I'm surprised this hasn't gotten asked for more often. The Confirm popup is already super useful, but it would be even better if it were a bit more flexible with the number of buttons it can display.

jacks-bush avatar Jul 13 '22 22:07 jacks-bush

+1 @jacks-bush We need the same.

eXpertise7 avatar Aug 25 '22 11:08 eXpertise7

Hi,

So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Please don't forget to add your feedback as a comment after reopening the issue. These will be taken into account by us and will contribute to the development of this feature. Thanks a lot for your understanding!

Best Regards,

mertsincan avatar Nov 09 '22 14:11 mertsincan