Skip to content

Commit 4e51e10

Browse files
pdanpdanrstoenescu
authored andcommitted
fix(QTr/QTd): Fix noHover not beeing respected when props are missing. Fix wrong on in QTr quasarframework#6035 (quasarframework#6037)
1 parent a85d696 commit 4e51e10

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

ui/src/components/table/QTd.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,20 @@ export default Vue.extend({
1111
noHover: Boolean
1212
},
1313

14+
computed: {
15+
classes () {
16+
return (this.autoWidth === true ? ' q-table--col-auto-width' : '') +
17+
(this.noHover === true ? ' q-td--no-hover' : '')
18+
}
19+
},
20+
1421
render (h) {
1522
const on = this.$listeners
1623

1724
if (this.props === void 0) {
1825
return h('td', {
1926
on,
20-
class: { 'q-table--col-auto-width': this.autoWidth }
27+
class: this.classes
2128
}, slot(this, 'default'))
2229
}
2330

@@ -32,9 +39,7 @@ export default Vue.extend({
3239
return h('td', {
3340
on,
3441
style: col.__tdStyle,
35-
class: col.__tdClass +
36-
(this.autoWidth === true ? ' q-table--col-auto-width' : '') +
37-
(this.noHover === true ? ' q-td--no-hover' : '')
42+
class: col.__tdClass + this.classes
3843
}, slot(this, 'default'))
3944
}
4045
})

ui/src/components/table/QTr.js

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,13 @@ export default Vue.extend({
1111
},
1212

1313
render (h) {
14-
const on = this.$listeners
15-
1614
return h(
1715
'tr',
18-
this.props === void 0 || this.props.header === true
19-
? on
20-
: {
21-
on,
22-
class: this.props.__trClass +
23-
(this.noHover === true ? ' q-tr--no-hover' : '')
24-
},
16+
{
17+
on: this.$listeners,
18+
class: (this.props === void 0 || this.props.header === true ? '' : this.props.__trClass) +
19+
(this.noHover === true ? ' q-tr--no-hover' : '')
20+
},
2521
slot(this, 'default')
2622
)
2723
}

0 commit comments

Comments
 (0)