Skip to content

Commit

Permalink
Set min width and width for date table column
Browse files Browse the repository at this point in the history
  • Loading branch information
wkramer committed Oct 1, 2024
1 parent 197cae8 commit 98f07de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/components/table/TimeSeriesTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
<tr>
<template v-for="(column, index) in columns" :key="column.key">
<th
:style="{ minWidth: column.minWidth }"
:class="[
(column as unknown as TableHeaders).class,
{
Expand Down Expand Up @@ -483,6 +482,11 @@ function onUpdateItem(event: TableData) {
width: 100%;
}
.date-header {
min-width: 24ch;
width: 24ch;
}
th.sticky-column {
position: sticky;
border-right: thin solid rgba(var(--v-border-color), var(--v-border-opacity));
Expand Down
3 changes: 1 addition & 2 deletions src/lib/table/createTableHeaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ export function createTableHeaders(
tableHeaders.push({
key: 'date',
title: 'Date',
minWidth: '24ch',
class: 'table-header sticky-column',
class: 'table-header sticky-column date-header',
editable: false,
})
seriesIds.forEach((seriesId) => {
Expand Down

0 comments on commit 98f07de

Please sign in to comment.