Skip to content

fix(b-table): selected table header text no longer prevents table row selection (fixes #6644) #6645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 18, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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