Skip to content

Commit

Permalink
Merge pull request #4742 from AlexVelezLl/fix-save-quick-edit-modal
Browse files Browse the repository at this point in the history
Fix save quick edit modals
  • Loading branch information
AllanOXDi authored Sep 19, 2024
2 parents 1016852 + ea91300 commit cc0b008
Show file tree
Hide file tree
Showing 2 changed files with 276 additions and 60 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,9 @@
},
canSave() {
if (this.hasMixedCategories) {
return Object.values(this.selectedValues).some(value => value.length > 0);
return Object.values(this.selectedValues).some(
value => value.length === this.nodes.length
);
}
return !this.error;
},
Expand Down Expand Up @@ -174,7 +176,7 @@
Object.assign(fieldValue, currentNode[this.field] || {});
}
Object.entries(this.selectedValues)
.filter(([value]) => value.length === this.nodeIds.length)
.filter(entry => entry[1].length === this.nodeIds.length)
.forEach(([key]) => {
fieldValue[key] = true;
});
Expand Down
Loading

0 comments on commit cc0b008

Please sign in to comment.