From b2a78fd063935e3bdcf85a8f2e35c5b159d7088c Mon Sep 17 00:00:00 2001 From: Yosi Levy <37745463+yosilevy@users.noreply.github.com> Date: Sat, 11 Jul 2020 19:11:13 +0300 Subject: [PATCH] Added forceLTR attribute on a column in ha-data-table (#6363) --- src/components/data-table/ha-data-table.ts | 5 +++++ .../lovelace/resources/ha-config-lovelace-resources.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/src/components/data-table/ha-data-table.ts b/src/components/data-table/ha-data-table.ts index c6b38fc84b..3ec2aba13a 100644 --- a/src/components/data-table/ha-data-table.ts +++ b/src/components/data-table/ha-data-table.ts @@ -69,6 +69,7 @@ export interface DataTableColumnData extends DataTableSortColumnData { width?: string; maxWidth?: string; grows?: boolean; + forceLTR?: boolean; } export interface DataTableRowData { @@ -352,6 +353,7 @@ export class HaDataTable extends LitElement { column.type === "icon-button" ), grows: Boolean(column.grows), + forceLTR: Boolean(column.forceLTR), })}" style=${column.width ? styleMap({ @@ -855,6 +857,9 @@ export class HaDataTable extends LitElement { flex-grow: 1; flex-shrink: 1; } + .forceLTR { + direction: ltr; + } `; } } diff --git a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts index 72cb604d6c..1b31ba3e10 100644 --- a/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts +++ b/src/panels/config/lovelace/resources/ha-config-lovelace-resources.ts @@ -65,6 +65,7 @@ export class HaConfigLovelaceRescources extends LitElement { filterable: true, direction: "asc", grows: true, + forceLTR: true, }, type: { title: this.hass.localize(