Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: reset instance assignment state (#15768)

ecmadaofb5fcb3ad3ea
diff --git a/frontend/src/components/InstanceAssignment.vue b/frontend/src/components/InstanceAssignment.vue
index cb48dc0948..ee22fcd31a 100644
--- a/frontend/src/components/InstanceAssignment.vue
+++ b/frontend/src/components/InstanceAssignment.vue
@@ -173,12 +173,26 @@ const disabledSelectedInstanceNames = computed(() => {
);
});
+const selectActivationInstances = (instances: Instance[]) => {
+ for (const instance of instances) {
+ if (instance.activation) {
+ state.selectedInstance.add(instance.name);
+ }
+ }
+};
+
watch(
- () => props.selectedInstanceList,
- () => {
- for (const instanceName of props.selectedInstanceList) {
+ [() => props.show, () => props.selectedInstanceList],
+ ([show, selectedInstanceList]) => {
+ if (!show) {
+ state.selectedInstance = new Set();
+ return;
+ }
+
+ for (const instanceName of selectedInstanceList) {
state.selectedInstance.add(instanceName);
}
+ selectActivationInstances(pagedInstanceTableRef.value?.dataList ?? []);
},
{ immediate: true }
);
@@ -186,13 +200,14 @@ watch(
watch(
() => pagedInstanceTableRef.value?.dataList ?? [],
(dataList) => {
+ selectActivationInstances(dataList);
for (const instance of dataList) {
if (instance.activation) {
state.selectedInstance.add(instance.name);
}
}
},
- { deep: true, immediate: true }
+ { deep: true }
);
const totalLicenseCount = computed((): string => {