Skip to content

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

Add rowClickable to normal table layout

Tianzhou Chen38c9826b3e6a
diff --git a/frontend/src/bbkit/BBTable/BBTable.vue b/frontend/src/bbkit/BBTable/BBTable.vue
index b1204f31d7..00a4a59058 100644
--- a/frontend/src/bbkit/BBTable/BBTable.vue
+++ b/frontend/src/bbkit/BBTable/BBTable.vue
@@ -61,8 +61,14 @@
<tr
v-for="(item, index) in dataSource"
:key="index"
- class="cursor-pointer hover:bg-gray-200"
- @click.stop="$emit('click-row', 0, index)"
+ :class="rowClickable ? 'cursor-pointer hover:bg-gray-200' : ''"
+ @click.stop="
+ () => {
+ if (rowClickable) {
+ $emit('click-row', 0, index);
+ }
+ }
+ "
>
<slot name="body" :rowData="item" />
</tr></tbody