From 1ceef7c3d33547ef4805f7f40d3e324d37c17192 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Wed, 3 Jul 2024 22:32:56 +0200 Subject: [PATCH] Set min column size to 1 for vertical tile card (#21275) --- src/panels/lovelace/cards/hui-tile-card.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/panels/lovelace/cards/hui-tile-card.ts b/src/panels/lovelace/cards/hui-tile-card.ts index 19a05e3bb4ab..ae8c8a99c0b8 100644 --- a/src/panels/lovelace/cards/hui-tile-card.ts +++ b/src/panels/lovelace/cards/hui-tile-card.ts @@ -123,19 +123,21 @@ export class HuiTileCard extends LitElement implements LovelaceCard { public getLayoutOptions(): LovelaceLayoutOptions { const grid_columns = 2; + let grid_min_columns = 2; let grid_rows = 1; if (this._config?.features?.length) { const featureHeight = Math.ceil((this._config.features.length * 2) / 3); grid_rows += featureHeight; } if (this._config?.vertical) { - grid_rows!++; + grid_rows++; + grid_min_columns = 1; } return { grid_columns, grid_rows, grid_min_rows: grid_rows, - grid_min_columns: grid_columns, + grid_min_columns, }; }