Reduce requests on label and assignee changes

Instead of sending a request for each label and assignee change on a
existing issue or patch, we should just do that for the new form,
where we wait for the confirmation for the final creation of the issue or patch.
This commit is contained in:
Sebastian Martinez
2023-11-06 18:16:19 +01:00
committed by Rūdolfs Ošiņš
parent 8e8c6981d9
commit 8d67698575
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -48,7 +48,7 @@
if (valid && assignee) {
updatedAssignees = [...updatedAssignees, assignee];
inputValue = "";
if (mode !== "readOnly") {
if (hideEditIcon) {
dispatch("save", updatedAssignees);
}
}
@@ -56,7 +56,7 @@
function removeAssignee(assignee: string) {
updatedAssignees = updatedAssignees.filter(x => x !== assignee);
if (mode !== "readOnly") {
if (hideEditIcon) {
dispatch("save", updatedAssignees);
}
}
+2 -2
View File
@@ -42,7 +42,7 @@
if (valid && sanitizedValue) {
updatedLabels = [...updatedLabels, sanitizedValue];
inputValue = "";
if (mode === "readWrite") {
if (hideEditIcon) {
dispatch("save", updatedLabels);
}
}
@@ -50,7 +50,7 @@
function removeLabel(label: string) {
updatedLabels = updatedLabels.filter(x => x !== label);
if (mode === "readWrite") {
if (hideEditIcon) {
dispatch("save", updatedLabels);
}
}