Skip to content

Commit

Permalink
fix(table): prevent rendering rows with very short height
Browse files Browse the repository at this point in the history
The table component dynamically adds inline styles
such as `height` to its rows and cells. The height is
added in `px`, and is calculated based on the content
of the cells. In some scenarios where the cells have no
content or hold web-components that load with delay,
after the table is rendered, the dynamic inlined `height`
styles used to be calculated very strangely, causing the
rows and cells to be very short height. This change will
prevent these things, by applying a proper default `min-height`.
  • Loading branch information
Kiarokh committed Jun 13, 2024
1 parent 309ba2a commit 09bcea3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/components/table/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ $table--limel-table--row-selector: 1;

.tabulator-row {
transition: background-color 0.2s ease;
min-height: 2.25rem;

&:hover {
transition: background-color 0.1s ease;
Expand All @@ -121,6 +122,8 @@ $table--limel-table--row-selector: 1;

display: inline-flex;
align-items: center;
min-height: inherit;

&[style*='text-align: right;'] {
justify-content: flex-end;
}
Expand Down

0 comments on commit 09bcea3

Please sign in to comment.