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:
@@ -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();
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user