Enable Save button as soon as the remarks are changed.

Closes #199.
This commit is contained in:
D. Berge
2022-04-27 19:45:26 +02:00
parent d386b97e42
commit 187807cfb1

View File

@@ -384,6 +384,11 @@ export default {
return true;
}
// The user is editing the remarks
if (this.entryRemarksText != this.entryRemarksInput) {
return true;
}
// Selected label set distinct from input labels
if (distinctSets(this.selectedLabels, this.entryLabels, (i) => i.text)) {
return true;
@@ -632,6 +637,12 @@ export default {
},
save () {
// In case the focus goes directly from the remarks field
// to the Save button.
if (this.entryRemarksInput != this.entryRemarksText) {
this.entryRemarks = this.entryRemarksInput;
}
const data = {
id: this.id,
remarks: this.entryRemarksText,