Skip to content

Commit b44ef23

Browse files
basselAhmedjohnleider
authored andcommitted
fix(VDatatable): remove extra border from expanded functionality (#10321)
fixes #6429 * fix(vdatatable): remove extra border from datatables with expanded rows * refactor(vdatatable): remove unncessary splitting in _datatable.styl
1 parent 0d081ad commit b44ef23

File tree

4 files changed

+19
-5
lines changed

4 files changed

+19
-5
lines changed

packages/vuetify/src/components/VDataTable/mixins/body.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,13 @@ export default {
2222
children.push(expand)
2323
}
2424

25+
const classes = {
26+
'v-datatable__expand-col': true,
27+
'v-datatable__expand-col--expanded': this.isExpanded(props.item)
28+
}
29+
2530
const transition = this.$createElement('transition-group', {
26-
class: 'v-datatable__expand-col',
31+
class: classes,
2732
attrs: { colspan: this.headerColumns },
2833
props: {
2934
tag: 'td'

packages/vuetify/src/stylus/components/_data-table.styl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ v-datatable($material)
2222
color: rgba($material.fg-color, $material.secondary-text-percent)
2323
border-top: 1px solid rgba($material.fg-color, $material.divider-percent)
2424

25+
.v-datatable__expand-col
26+
&--expanded
27+
border-bottom: 1px solid $material.table.border
28+
29+
2530
theme(v-datatable, "v-datatable")
2631

2732
.v-datatable
@@ -112,14 +117,16 @@ theme(v-datatable, "v-datatable")
112117

113118
.v-datatable__expand
114119
&-row
115-
border: none !important
120+
border-top: none !important
116121

117122
&-col
118123
padding: 0 !important
119124
height: 0px !important
125+
visibility: hidden
120126

121127
&--expanded
122-
border-bottom: 1px solid rgba(0,0,0,0.12)
128+
visibility: visible
129+
123130

124131
&-content
125132
transition: height $primary-transition

packages/vuetify/src/stylus/components/_tables.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ v-table($material)
1616

1717
tbody
1818
tr
19-
&:not(:last-child)
20-
border-bottom: 1px solid rgba($material.fg-color, $material.divider-percent)
19+
&:not(:first-child)
20+
border-top: 1px solid rgba($material.fg-color, $material.divider-percent)
2121

2222
&[active]
2323
background: $material.table.active

packages/vuetify/src/stylus/settings/_theme.styl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ $material-light := {
8383
table: {
8484
active: $grey.lighten-4
8585
hover: $grey.lighten-3
86+
border: $grey.lighten-2
8687
},
8788
picker: {
8889
body: $shades.white,
@@ -187,6 +188,7 @@ $material-dark := {
187188
table: {
188189
active: #505050
189190
hover: $grey.darken-2
191+
border: $grey.darken-2
190192
},
191193
picker: {
192194
body: $grey.darken-3,

0 commit comments

Comments
 (0)