Skip to content

Commit

Permalink
fix(VDataTable): fix header column widths not being respected (#8296)
Browse files Browse the repository at this point in the history
setting both width and min-width as styles on header row was the only
way I could get a consistent result

closes #5072
closes #7623
  • Loading branch information
nekosaur authored and johnleider committed Aug 12, 2019
1 parent 56c7e65 commit a18cc68
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 15 deletions.
3 changes: 0 additions & 3 deletions packages/vuetify/src/components/VDataTable/VDataTable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,6 @@ export default VDataIterator.extend({
class: {
divider: header.divider,
},
style: {
width: header.width,
},
})
}))
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ export default mixins(header).extend({
scope: 'col',
'aria-label': header.text || '',
'aria-sort': 'none',
}

const styles = {
width: header.width,
minWidth: header.width,
}

const classes = [
Expand Down Expand Up @@ -77,6 +81,7 @@ export default mixins(header).extend({
return this.$createElement('th', {
attrs,
class: classes,
style: styles,
on: listeners,
}, children)
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2706,9 +2706,7 @@ exports[`VDataTable.ts should render with showExpand 1`] = `
<div class="v-data-table__wrapper">
<table>
<colgroup>
<col class
style="width: 1px;"
>
<col class>
<col class>
<col class>
<col class>
Expand All @@ -2722,8 +2720,8 @@ exports[`VDataTable.ts should render with showExpand 1`] = `
scope="col"
aria-label
aria-sort="none"
width="1px"
class="text-start"
style="width: 1px; min-width: 1px;"
>
<span>
</span>
Expand Down Expand Up @@ -3043,9 +3041,7 @@ exports[`VDataTable.ts should render with showExpand 2`] = `
<div class="v-data-table__wrapper">
<table>
<colgroup>
<col class
style="width: 1px;"
>
<col class>
<col class>
<col class>
<col class>
Expand All @@ -3059,8 +3055,8 @@ exports[`VDataTable.ts should render with showExpand 2`] = `
scope="col"
aria-label
aria-sort="none"
width="1px"
class="text-start"
style="width: 1px; min-width: 1px;"
>
<span>
</span>
Expand Down Expand Up @@ -3380,9 +3376,7 @@ exports[`VDataTable.ts should render with showSelect 1`] = `
<div class="v-data-table__wrapper">
<table>
<colgroup>
<col class
style="width: 1px;"
>
<col class>
<col class>
<col class>
<col class>
Expand All @@ -3396,8 +3390,8 @@ exports[`VDataTable.ts should render with showSelect 1`] = `
scope="col"
aria-label
aria-sort="none"
width="1px"
class="text-start"
style="width: 1px; min-width: 1px;"
>
<div class="v-data-table__checkbox v-simple-checkbox">
<div class="v-input--selection-controls__ripple">
Expand Down

0 comments on commit a18cc68

Please sign in to comment.