feat: prevent row click on certain cell
This commit is contained in:
committed by
Joel Jacob Stephen
parent
a875ab1ca9
commit
27eb7690ba
@@ -21,7 +21,7 @@
|
||||
<td
|
||||
v-for="cellHeading in headings"
|
||||
:key="cellHeading.key"
|
||||
@click="onRowClicked(rowData)"
|
||||
@click="!cellHeading.preventClick && onRowClicked(rowData)"
|
||||
class="max-w-40"
|
||||
:class="cellStyles"
|
||||
>
|
||||
@@ -42,7 +42,11 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup generic="Item extends Record<string, unknown>">
|
||||
export type CellHeading = { label?: string; key: string }
|
||||
export type CellHeading = {
|
||||
key: string
|
||||
label?: string
|
||||
preventClick?: boolean
|
||||
}
|
||||
|
||||
defineProps<{
|
||||
/** Whether to show the vertical border between columns */
|
||||
|
||||
Reference in New Issue
Block a user