added general disabled implementation in base dialog
This commit is contained in:
parent
f7004520a7
commit
763ac410bd
@ -23,7 +23,6 @@ export interface SaveOptions {
|
||||
* (otherwise the save request will be triggered twice).
|
||||
* */
|
||||
export abstract class BaseDialogComponent extends AutoUnsubscribe implements OnInit {
|
||||
abstract disabled: boolean;
|
||||
|
||||
protected readonly _dialogService: ConfirmationDialogService = this._injector.get(ConfirmationDialogService);
|
||||
protected _waitingForConfirmation = false;
|
||||
@ -78,6 +77,10 @@ export abstract class BaseDialogComponent extends AutoUnsubscribe implements OnI
|
||||
return false;
|
||||
}
|
||||
|
||||
get disabled(): boolean {
|
||||
return !this.valid || !this.changed;
|
||||
}
|
||||
|
||||
close(): void {
|
||||
if (this.changed) {
|
||||
this._openConfirmDialog().then(result => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user