Avoid flicking of backup target list if default changes
This commit is contained in:
@@ -134,7 +134,8 @@ async function onPrimaryTargetChanged(value) {
|
||||
const [error] = await backupTargetsModel.setPrimary(value);
|
||||
if (error) return console.error(error);
|
||||
|
||||
await refresh();
|
||||
// update the list to be in sync without flickering
|
||||
targets.value.forEach(t => t.primary = t.id === value);
|
||||
|
||||
primaryTargetId.value = value;
|
||||
primaryTargetChangeBusy.value = false;
|
||||
|
||||
Reference in New Issue
Block a user