Skip to content

Commit

Permalink
feat(core): dialog-button-handling
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelTr committed Jul 11, 2024
1 parent b079160 commit 997ca05
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion projects/core/components/dialog/dialog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ export class TuiDialogComponent<O, I> {
constructor(
@Inject(TUI_ANIMATIONS_DURATION) private readonly duration: number,
@Inject(TUI_IS_MOBILE) private readonly isMobile: boolean,
@Inject(POLYMORPHEUS_CONTEXT) readonly context: TuiDialog<TuiDialogOptions<I>, O>,
@Inject(POLYMORPHEUS_CONTEXT)
readonly context: TuiDialog<TuiDialogOptions<I>, O | undefined>,
@Inject(TuiDestroyService) @Self() destroy$: Observable<void>,
@Inject(TuiDialogCloseService) dialogClose$: Observable<unknown>,
@Inject(TUI_DIALOGS_CLOSE) close$: Observable<unknown>,
Expand Down
2 changes: 1 addition & 1 deletion projects/core/components/dialog/dialog.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
tuiAutoFocus
tuiButton
type="button"
(click)="context.$implicit.complete()"
(click)="context.$implicit.next(undefined)"
>
{{ $any(context.data)?.button || 'OK' }}
</button>
Expand Down

0 comments on commit 997ca05

Please sign in to comment.