Skip to content

Commit 010ab31

Browse files
connorf25xanf
andauthored
fix(b-table): selected table header text no longer prevents table row selection (bootstrap-vue#6645)
Co-authored-by: Illya Klymov <xanf@xanf.me>
1 parent b16514b commit 010ab31

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/components/table/helpers/mixin-tbody.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,15 @@ export const tbodyMixin = Vue.extend({
124124
}
125125
},
126126
onTBodyRowClicked(event) {
127+
const { $refs } = this
128+
const tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null
127129
// Don't emit event when the table is busy, the user clicked
128130
// on a non-disabled control or is selecting text
129-
if (this.tbodyRowEventStopped(event) || filterEvent(event) || textSelectionActive(this.$el)) {
131+
if (
132+
this.tbodyRowEventStopped(event) ||
133+
filterEvent(event) ||
134+
textSelectionActive(tbody || this.$el)
135+
) {
130136
return
131137
}
132138
this.emitTbodyRowEvent(EVENT_NAME_ROW_CLICKED, event)

0 commit comments

Comments
 (0)