From e2c48dfa670b164a4284657dd3a9fc24cd8f901d Mon Sep 17 00:00:00 2001 From: Connor Forbes Date: Wed, 2 Jun 2021 11:34:31 +1000 Subject: [PATCH] fix(b-table): selected table header text no longer prevents table row selection --- src/components/table/helpers/mixin-tbody.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/table/helpers/mixin-tbody.js b/src/components/table/helpers/mixin-tbody.js index c124095a314..cc6bf8a04ca 100644 --- a/src/components/table/helpers/mixin-tbody.js +++ b/src/components/table/helpers/mixin-tbody.js @@ -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)