Skip to content

Commit

Permalink
Fix: Problem with table headers and dates moving from 0.9.25 to 0.9.27 (
Browse files Browse the repository at this point in the history
buefy#3971) (buefy#3986)

* fix(lib): percentage width on columns doubly applied

- Fixes the issue that column widths were doubly applied when they were
  given in percentage ('%'). Interestingly, percentage widths have
  effect on `<th>` elements in contrast to absolute values; e.g., 200px.
  So we won't apply the column widths given in percentage to `.th-wrap`
  elements to prevent widths from being doubly applied.

issue buefy#3971
  • Loading branch information
kikuomax committed Feb 12, 2024
1 parent 876b646 commit 797b1d6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/buefy-next/src/components/table/TableColumn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ export default {
return style
},
thWrapStyle() {
return this.style
const width = toCssWidth(this.width)
// interestingly, percentage width on the th element has effect
// so we won't apply it to .th-wrap
if (width != null && !width.trim().endsWith('%')) {
return { width }
} else {
return {}
}
},
rootClasses() {
return [this.cellClass, {
Expand Down

0 comments on commit 797b1d6

Please sign in to comment.