Skip to content

Commit cd1e8dd

Browse files
committed
feat: Updates to QTable
1 parent 0e17fb5 commit cd1e8dd

File tree

6 files changed

+8
-19
lines changed

6 files changed

+8
-19
lines changed

src/components/table/QTable.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,8 @@ export default {
4242
columns: Array,
4343
loader: Boolean,
4444
title: String,
45-
noTop: Boolean,
46-
noHeader: Boolean,
47-
noBottom: Boolean,
45+
hideHeader: Boolean,
46+
hidePagination: Boolean,
4847
dark: Boolean,
4948
separator: {
5049
type: String,

src/components/table/table-bottom.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
])
1717
}
1818

19-
if (this.noBottom) {
19+
if (this.hidePagination) {
2020
return
2121
}
2222

src/components/table/table-header.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import QTh from './QTh'
55
export default {
66
methods: {
77
getTableHeader (h) {
8-
if (this.noHeader) {
8+
if (this.hideHeader) {
99
return
1010
}
1111

@@ -88,7 +88,7 @@ export default {
8888
addTableHeaderRowMeta (data) {
8989
if (this.multipleSelection) {
9090
Object.defineProperty(data, 'selected', {
91-
get: () => this.allRowsSelected,
91+
get: () => this.someRowsSelected ? 'some' : this.allRowsSelected,
9292
set: val => {
9393
if (this.someRowsSelected) {
9494
val = false

src/components/table/table-top.js

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
export default {
22
methods: {
33
getTop (h) {
4-
if (this.noTop) {
5-
return
6-
}
7-
84
const
95
top = this.$scopedSlots.top,
106
topLeft = this.$scopedSlots['top-left'],
117
topRight = this.$scopedSlots['top-right'],
128
topSelection = this.$scopedSlots['top-selection'],
139
hasSelection = this.selection && topSelection && this.rowsSelectedNumber > 0,
14-
cls = 'q-table-top relative-position row no-wrap items-center',
10+
staticClass = 'q-table-top relative-position row no-wrap items-center',
1511
child = [],
1612
props = {
1713
hasSelection,
@@ -20,7 +16,7 @@ export default {
2016
}
2117

2218
if (top) {
23-
return h('div', { staticClass: cls }, [ top(props) ])
19+
return h('div', { staticClass }, [ top(props) ])
2420
}
2521

2622
if (hasSelection) {
@@ -44,9 +40,7 @@ export default {
4440
return
4541
}
4642

47-
return h('div', {
48-
staticClass: `${cls}${hasSelection ? ` text-${this.color} q-table-top-selection` : ''}`
49-
}, child)
43+
return h('div', { staticClass }, child)
5044
}
5145
}
5246
}

src/components/table/table.ios.styl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
left 0
1818
opacity .2
1919
transition $table-transition
20-
.q-table-top-selection:before
21-
background currentColor
2220
.q-table-separator
2321
min-width 8px
2422
.q-table-nodata .q-icon

src/components/table/table.mat.styl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
left 0
1818
opacity .2
1919
transition $table-transition
20-
.q-table-top-selection:before
21-
background currentColor
2220
.q-table-separator
2321
min-width 8px
2422
.q-table-nodata .q-icon

0 commit comments

Comments
 (0)