fix(dashboard): editing and backing out should not update the card

This commit is contained in:
Jake Fulmine 2022-08-22 12:13:52 +02:00
parent 68d15b98f7
commit e2b958c305
6 changed files with 30 additions and 14 deletions

View file

@ -23,6 +23,10 @@
dispatch('deletion', group.id);
}
function update(group: Group) {
dispatch('update', group);
}
async function submit() {
let data = input;
err = [];
@ -45,7 +49,7 @@
loading = true;
try {
let res = await api().groups(group.id).patch({data});
group = {...group, ...res};
update({...group, ...res});
err = [];
success = true;
loading = false;