Skip to content

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

Make BBTable rowClickable as an option

Tianzhou Chen6bf5c0f2008f
diff --git a/frontend/src/bbkit/BBTable/BBTable.vue b/frontend/src/bbkit/BBTable/BBTable.vue
index 3f924e4325..6834f7af5a 100644
--- a/frontend/src/bbkit/BBTable/BBTable.vue
+++ b/frontend/src/bbkit/BBTable/BBTable.vue
@@ -35,8 +35,14 @@
<tr
v-for="(item, j) in section.list"
:key="j"
- class="cursor-pointer hover:bg-gray-200"
- @click.stop="$emit('click-row', i, j)"
+ :class="rowClickable ? 'cursor-pointer hover:bg-gray-200' : ''"
+ @click.stop="
+ () => {
+ if (rowClickable) {
+ $emit('click-row', i, j);
+ }
+ }
+ "
>
<slot name="body" :rowData="item" />
</tr>
@@ -93,6 +99,10 @@ export default {
default: true,
type: Boolean,
},
+ rowClickable: {
+ defalut: true,
+ type: Boolean,
+ },
backgroundColor: {
default: "bg-white",
type: String,
diff --git a/frontend/src/components/MemberTable.vue b/frontend/src/components/MemberTable.vue
index 2baa8fd1e7..402ea1b749 100644
--- a/frontend/src/components/MemberTable.vue
+++ b/frontend/src/components/MemberTable.vue
@@ -3,6 +3,7 @@
:columnList="columnList"
:sectionDataSource="dataSource"
:showHeader="true"
+ :rowClickable="false"
>
<template v-slot:header>
<BBTableHeaderCell
@@ -34,7 +35,12 @@
<BBTableCell class="w-48 table-cell">
<div class="flex flex-row items-center">
{{ humanizeTs(roleMapping.lastUpdatedTs) }}
- <span class="ml-1">by {{ roleMapping.principal.name }}</span>
+ <span class="ml-1"
+ >by
+ <router-link :to="`/u/${roleMapping.principal.id}`"
+ >{{ roleMapping.principal.name }}
+ </router-link></span
+ >
</div>
</BBTableCell>
<BBTableCell>