lumapps / lumX

The first responsive front-end framework based on Angular & Google Material Design specifications
https://ui.lumapps.com
MIT License
1.96k stars 274 forks source link

_canceled always true when closing a dialog #621

Closed StephaneConqDGC closed 5 years ago

StephaneConqDGC commented 5 years ago

Hi,

Each time I close my Dialog, I try to catch the event in my JS. image

This works, but I want to use the _canceledparameter. And this parameter is always "true", however I close my dialog. image In the documentation, there is no difference between the OK button and the Cancel button.

How can I make the difference between closing the button with Cancel or OK ?

Thanks in advance.

clementprevot commented 5 years ago

Hi @StephaneConqDGC

You should not always use lx-dialog-close. This one always close the dialog as a cancel.

Instead, you should bind a ng-click on your "OK" button to a function that will call LxDialogService.close(dialogId[, isCanceled, params]).

Hope this helps.