1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-13 14:53:33 +00:00

[PM-2198] Async simple configurable dialogs (#5411)

Implements a new functionality for simple configurable dialogs that allows you to set an acceptAction which triggers a pending state. To use this set acceptAction to an async method, and it will be executed on accept prior to closing the dialog.
This commit is contained in:
Oscar Hinton
2023-08-11 13:20:47 +02:00
committed by GitHub
parent 2187db2153
commit 4b1570b0b3
7 changed files with 156 additions and 190 deletions

View File

@@ -20,7 +20,7 @@ export class BitActionDirective implements OnDestroy {
disabled = false;
@Input("bitAction") protected handler: FunctionReturningAwaitable;
@Input("bitAction") handler: FunctionReturningAwaitable;
readonly loading$ = this._loading$.asObservable();

View File

@@ -18,7 +18,7 @@ export class BitSubmitDirective implements OnInit, OnDestroy {
private _loading$ = new BehaviorSubject<boolean>(false);
private _disabled$ = new BehaviorSubject<boolean>(false);
@Input("bitSubmit") protected handler: FunctionReturningAwaitable;
@Input("bitSubmit") handler: FunctionReturningAwaitable;
@Input() allowDisabledFormSubmit?: boolean = false;