Skip to content

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

fix: checkbox (#10066)

ecmadao91e12b1991e9
diff --git a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
index f281979c71..f847fc68bd 100644
--- a/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/AlterSchemaPrepForm.vue
@@ -170,8 +170,7 @@
<NCheckbox
v-if="selectedDatabaseList.length > 0"
class="h-4 w-4 text-accent rounded disabled:cursor-not-allowed border-control-border focus:ring-accent"
- :checked="getAllSelectionState(selectedDatabaseList as ComposedDatabase[]).checked"
- :indeterminate="getAllSelectionState(selectedDatabaseList as ComposedDatabase[]).indeterminate"
+ v-bind="getAllSelectionState(selectedDatabaseList as ComposedDatabase[])"
@update:checked="
toggleDatabasesSelection(
selectedDatabaseList as ComposedDatabase[],
diff --git a/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue b/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
index 7102e59bd2..6536de3ee4 100644
--- a/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
+++ b/frontend/src/components/AlterSchemaPrepForm/ProjectStandardView.vue
@@ -27,19 +27,13 @@
:name="environment.uid"
>
<template #header>
- <label class="flex items-center gap-x-2" @click.stop="">
+ <label class="flex items-center gap-x-2" @click.stop.prevent>
<NCheckbox
- :checked="
+ v-bind="
getAllSelectionStateForEnvironment(
environment,
databaseListInEnvironment
- ).checked
- "
- :indeterminate="
- getAllSelectionStateForEnvironment(
- environment,
- databaseListInEnvironment
- ).indeterminate
+ )
"
@update:checked="
toggleAllDatabasesSelectionForEnvironment(
diff --git a/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue b/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue
index 1bb8dfb535..a3555eb7d2 100644
--- a/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue
+++ b/frontend/src/components/ChangeHistory/ChangeHistoryTable.vue
@@ -14,8 +14,7 @@
<BBTableHeaderCell class="w-12" :left-padding="4" @click.stop="">
<NCheckbox
v-if="historySectionList.length > 0"
- :checked="allSelectionState.checked"
- :indeterminate="allSelectionState.indeterminate"
+ v-bind="allSelectionState"
@update:checked="toggleAllChangeHistorySelection"
/>
</BBTableHeaderCell>
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
index e4bd722eda..b04c324258 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/BranchTable/BranchTable.vue
@@ -19,8 +19,7 @@
>
<template v-if="index === 0">
<NCheckbox
- :checked="allSelectionState.checked"
- :indeterminate="allSelectionState.indeterminate"
+ v-bind="allSelectionState"
@update:checked="toggleSelectAll"
/>
</template>
@@ -29,11 +28,10 @@
</div>
</template>
<template #item="{ item: branch }: BBGridRow<Branch>">
- <div class="bb-grid-cell">
+ <div class="bb-grid-cell" @click.stop.prevent>
<NCheckbox
:checked="isSelected(branch)"
@update:checked="toggleSelect(branch, $event)"
- @click.stop
/>
</div>
diff --git a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue
index 137260d717..a6fa4055f0 100644
--- a/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue
+++ b/frontend/src/components/Changelist/ChangelistDetail/AddChangePanel/form/ChangeHistoryTable/ChangeHistoryTable.vue
@@ -19,8 +19,7 @@
>
<template v-if="index === 0">
<NCheckbox
- :checked="allSelectionState.checked"
- :indeterminate="allSelectionState.indeterminate"
+ v-bind="allSelectionState"
@update:checked="toggleSelectAll"
/>
</template>
@@ -29,11 +28,10 @@
</div>
</template>
<template #item="{ item: changeHistory }: BBGridRow<ChangeHistory>">
- <div class="bb-grid-cell">
+ <div class="bb-grid-cell" @click.stop.prevent>
<NCheckbox
:checked="isSelected(changeHistory)"
@update:checked="toggleSelect(changeHistory, $event)"
- @click.stop
/>
</div>
diff --git a/frontend/src/components/InstanceAssignment.vue b/frontend/src/components/InstanceAssignment.vue
index 75903ee7d6..0b0c9adff5 100644
--- a/frontend/src/components/InstanceAssignment.vue
+++ b/frontend/src/components/InstanceAssignment.vue
@@ -42,8 +42,7 @@
<template v-if="index === 0 && canManageSubscription">
<NCheckbox
v-if="instanceList.length > 0"
- :checked="allSelectionState.checked"
- :indeterminate="allSelectionState.indeterminate"
+ v-bind="allSelectionState"
:disabled="
!allSelectionState.checked &&
instanceList.length > instanceLicenseCount
@@ -56,7 +55,11 @@
</div>
</template>
<template #item="{ item: instance }: { item: ComposedInstance }">
- <div v-if="canManageSubscription" class="bb-grid-cell">
+ <div
+ v-if="canManageSubscription"
+ class="bb-grid-cell"
+ @click.stop.prevent
+ >
<NCheckbox
:checked="isInstanceSelected(instance)"
:disabled="
diff --git a/frontend/src/components/IssueV1/components/IssueTableV1.vue b/frontend/src/components/IssueV1/components/IssueTableV1.vue
index 33a325982b..7293525980 100644
--- a/frontend/src/components/IssueV1/components/IssueTableV1.vue
+++ b/frontend/src/components/IssueV1/components/IssueTableV1.vue
@@ -30,8 +30,7 @@
<template v-if="index === 0">
<NCheckbox
v-if="issueList.length > 0"
- :checked="allSelectionState.checked"
- :indeterminate="allSelectionState.indeterminate"
+ v-bind="allSelectionState"
@update:checked="setAllIssuesSelection"
/>
</template>
@@ -40,11 +39,11 @@
</div>
</template>
<template #item="{ item: issue }: { item: ComposedIssue }">
- <div
- class="bb-grid-cell"
- @click.stop="setIssueSelection(issue, !isIssueSelected(issue))"
- >
- <NCheckbox :checked="isIssueSelected(issue)" />
+ <div class="bb-grid-cell" @click.stop.prevent>
+ <NCheckbox
+ :checked="isIssueSelected(issue)"
+ @update:checked="setIssueSelection(issue, $event)"
+ />
</div>
<div class="bb-grid-cell !px-1">
<IssueStatusIcon
diff --git a/frontend/src/components/ProjectDatabasesPanel.vue b/frontend/src/components/ProjectDatabasesPanel.vue
index 986325d973..efcebbb3da 100644
--- a/frontend/src/components/ProjectDatabasesPanel.vue
+++ b/frontend/src/components/ProjectDatabasesPanel.vue
@@ -33,8 +33,7 @@
<template #selection-all="{ databaseList: selectedDatabaseList }">
<NCheckbox
v-if="selectedDatabaseList.length > 0"
- :checked="getAllSelectionState(selectedDatabaseList as ComposedDatabase[]).checked"
- :indeterminate="getAllSelectionState(selectedDatabaseList as ComposedDatabase[]).indeterminate"
+ v-bind="getAllSelectionState(selectedDatabaseList as ComposedDatabase[])"
@update:checked="
toggleDatabasesSelection(
selectedDatabaseList as ComposedDatabase[],
diff --git a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
index ddcfb608f7..d158e9b4bb 100644
--- a/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
+++ b/frontend/src/components/ProjectMember/ProjectMemberPanel.vue
@@ -48,8 +48,7 @@
<template #selection-all="{ memberList }">
<NCheckbox
v-if="renderedComposedMemberList.length > 0"
- :checked="getAllSelectionState(memberList).checked"
- :indeterminate="getAllSelectionState(memberList).indeterminate"
+ v-bind="getAllSelectionState(memberList)"
@update:checked="toggleAllMembersSelection(memberList, $event)"
/>
</template>
diff --git a/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue b/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue
index 9175133e5e..df28378c3a 100644
--- a/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue
+++ b/frontend/src/components/SensitiveData/components/SensitiveColumnTable.vue
@@ -19,8 +19,7 @@
<template v-if="index === 0 && rowSelectable">
<NCheckbox
v-if="columnList.length > 0"
- :checked="allSelectionState.checked"
- :indeterminate="allSelectionState.indeterminate"
+ v-bind="allSelectionState"
@update:checked="toggleSelectAll"
/>
</template>
diff --git a/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue b/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue
index e824640344..a8e31eafdc 100644
--- a/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue
+++ b/frontend/src/components/SyncDatabaseSchema/TargetDatabasesSelectPanel.vue
@@ -34,19 +34,13 @@
:name="environment.uid"
>
<template #header>
- <label class="flex items-center gap-x-2" @click.stop="">
+ <label class="flex items-center gap-x-2" @click.stop.prevent>
<NCheckbox
- :checked="
+ v-bind="
getAllSelectionStateForEnvironment(
environment,
databaseListInEnvironment
- ).checked
- "
- :indeterminate="
- getAllSelectionStateForEnvironment(
- environment,
- databaseListInEnvironment
- ).indeterminate
+ )
"
@update:checked="
toggleAllDatabasesSelectionForEnvironment(
diff --git a/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue b/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue
index 385a559809..751aea7a77 100644
--- a/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue
+++ b/frontend/src/components/TransferDatabaseForm/MultipleDatabaseSelector.vue
@@ -14,19 +14,13 @@
:name="environment.uid"
>
<template #header>
- <label class="flex items-center gap-x-2" @click.stop="">
+ <label class="flex items-center gap-x-2" @click.stop.prevent>
<NCheckbox
- :checked="
+ v-bind="
getAllSelectionStateForEnvironment(
environment,
databaseListInEnvironment
- ).checked
- "
- :indeterminate="
- getAllSelectionStateForEnvironment(
- environment,
- databaseListInEnvironment
- ).indeterminate
+ )
"
@update:checked="
toggleAllDatabasesSelectionForEnvironment(
@@ -65,22 +59,23 @@
>
<template #item="{ item: database }: { item: ComposedDatabase }">
<div class="bb-grid-cell gap-x-2 !pl-[23px]">
- <NCheckbox
- :checked="
- isDatabaseSelectedForEnvironment(
- database.uid,
- environment.uid
- )
- "
- @update:checked="
- (checked) =>
+ <div @click.stop.prevent>
+ <NCheckbox
+ :checked="
+ isDatabaseSelectedForEnvironment(
+ database.uid,
+ environment.uid
+ )
+ "
+ @update:checked="
toggleDatabaseIdForEnvironment(
database.uid,
environment.uid,
- checked
+ $event
)
- "
- />
+ "
+ />
+ </div>
<span
class="font-medium text-main"
:class="database.syncState !== State.ACTIVE && 'opacity-40'"
diff --git a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue
index b101a1930d..4004e47df8 100644
--- a/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue
+++ b/frontend/src/components/v2/Model/Instance/InstanceV1Table/InstanceV1Table.vue
@@ -22,8 +22,7 @@
v-if="index === 0 && allowSelection && instanceList.length > 0"
>
<NCheckbox
- :checked="allSelectionState.checked"
- :indeterminate="allSelectionState.indeterminate"
+ v-bind="allSelectionState"
@update:checked="selectAllInstances($event)"
/>
</template>
@@ -32,7 +31,7 @@
</div>
</template>
<template #item="{ item: instance }: InstanceRow">
- <div v-if="allowSelection" class="bb-grid-cell">
+ <div v-if="allowSelection" class="bb-grid-cell" @click.stop.prevent>
<NCheckbox
:checked="isInstanceSelected(instance)"
@update:checked="toggleSelectInstance(instance, $event)"
diff --git a/frontend/src/views/DatabaseDashboard.vue b/frontend/src/views/DatabaseDashboard.vue
index 2ab055f3f4..c7430eed08 100644
--- a/frontend/src/views/DatabaseDashboard.vue
+++ b/frontend/src/views/DatabaseDashboard.vue
@@ -32,8 +32,7 @@
<template #selection-all="{ databaseList }">
<NCheckbox
v-if="databaseList.length > 0"
- :checked="getAllSelectionState(databaseList).checked"
- :indeterminate="getAllSelectionState(databaseList).indeterminate"
+ v-bind="getAllSelectionState(databaseList)"
@update:checked="toggleDatabasesSelection(databaseList, $event)"
/>
</template>