ngneat / dialog

👻 A simple to use, highly customizable, and powerful modal for Angular Applications
https://ngneat.github.io/dialog/
MIT License
394 stars 38 forks source link

feat: allow to reset config once dialog has been opened #107

Closed va-stefanek closed 11 months ago

va-stefanek commented 1 year ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Other... Please describe:

What is the current behavior?

We are not allowed to override config once it has been opened

Issue Number: #41

What is the new behavior?

We can override config of the dialog after opening

stackblitz[bot] commented 1 year ago

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

va-stefanek commented 1 year ago

@NetanelBasal do you have any idea how I can write tests for it? I see that we are not testing dialogRef methods like onClose, onReset and now mine updateDialogConfig

NetanelBasal commented 1 year ago

You can mock it

va-stefanek commented 1 year ago

@NetanelBasal I have added some basic test and documentation

va-stefanek commented 1 year ago

@NetanelBasal can I ask for review?

shaharkazaz commented 11 months ago

We appreciate the PR, I've added this feature (with a different API) as part of a refactor I've made. It's available in v4.2.0, see the usage example under DialogRef API