switch to one-way-binding in form

This commit is contained in:
2021-11-01 21:17:20 +01:00
parent 125af5a206
commit 0ab106d021
2 changed files with 11 additions and 7 deletions

View File

@ -39,7 +39,7 @@ export class AccountComponent implements OnInit {
accountEntryCategoriesMap: Map<number, AccountEntryCategory>
accountEntryCategoriesInverseMap: Map<string, AccountEntryCategory>
newAccountEntry: AccountEntry = NULL_AccountEntry
// newAccountEntry: AccountEntry = NULL_AccountEntry
constructor(
@ -87,7 +87,10 @@ export class AccountComponent implements OnInit {
}
}
async addAccountEntry(): Promise<void> {
async addAccountEntry(userForm: any): Promise<void> {
this.messageService.add(`${JSON.stringify(userForm.value, undefined, 4)}`)
userForm.reset()
/*
try {
this.addAccountEntryButton.disabled = true
this.newAccountEntry.account = this.account.id
@ -101,6 +104,7 @@ export class AccountComponent implements OnInit {
} finally {
this.addAccountEntryButton.disabled = false
}
*/
}
async getAccountEntryCategories(): Promise<void> {