Skip to content

Commit

Permalink
fix(b-table): selected table header text no longer prevents table row…
Browse files Browse the repository at this point in the history
… selection (#6645)

Co-authored-by: Illya Klymov <xanf@xanf.me>
  • Loading branch information
connorf25 and xanf committed Dec 18, 2021
1 parent b16514b commit 010ab31
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/components/table/helpers/mixin-tbody.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,15 @@ export const tbodyMixin = Vue.extend({
}
},
onTBodyRowClicked(event) {
const { $refs } = this
const tbody = $refs.tbody ? $refs.tbody.$el || $refs.tbody : null
// Don't emit event when the table is busy, the user clicked
// on a non-disabled control or is selecting text
if (this.tbodyRowEventStopped(event) || filterEvent(event) || textSelectionActive(this.$el)) {
if (
this.tbodyRowEventStopped(event) ||
filterEvent(event) ||
textSelectionActive(tbody || this.$el)
) {
return
}
this.emitTbodyRowEvent(EVENT_NAME_ROW_CLICKED, event)
Expand Down

0 comments on commit 010ab31

Please sign in to comment.