Skip to content

Commit 470c533

Browse files
committed
Enchanted btable event filtering to prevent the unnecessary need to add modifiers to children's events - fixes #723 issue
1 parent 2f1a2b9 commit 470c533

File tree

1 file changed

+5
-4
lines changed
  • packages/bootstrap-vue-3/src/components/BTable

1 file changed

+5
-4
lines changed

packages/bootstrap-vue-3/src/components/BTable/BTable.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@
7272
<template v-for="(item, itemIndex) in computedItems" :key="itemIndex">
7373
<tr
7474
:class="getRowClasses(item)"
75-
@click="onRowClick(item, itemIndex, $event)"
76-
@dblclick="onRowDblClick(item, itemIndex, $event)"
77-
@mouseenter="onRowMouseEnter(item, itemIndex, $event)"
78-
@mouseleave="onRowMouseLeave(item, itemIndex, $event)"
75+
@click="!filterEvent($event) && onRowClick(item, itemIndex, $event)"
76+
@dblclick="!filterEvent($event) && onRowDblClick(item, itemIndex, $event)"
77+
@mouseenter="!filterEvent($event) && onRowMouseEnter(item, itemIndex, $event)"
78+
@mouseleave="!filterEvent($event) && onRowMouseLeave(item, itemIndex, $event)"
7979
>
8080
<td
8181
v-if="addSelectableCell"
@@ -192,6 +192,7 @@ import type {
192192
} from '../../types'
193193
import type {BTableProvider, BTableSortCompare} from '../../types/components'
194194
import BTableSimple from './BTableSimple.vue'
195+
import {filterEvent} from './helpers/filter-event'
195196
import useItemHelper from './itemHelper'
196197
197198
type NoProviderTypes = 'paging' | 'sorting' | 'filtering'

0 commit comments

Comments
 (0)