100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
check if cell contains a number. if it does, align to the right using the helper class
Vincent035f10842046
diff --git a/ui/component/or-table/src/index.ts b/ui/component/or-table/src/index.tsindex 2fb190702..14a23638b 100644--- a/ui/component/or-table/src/index.ts+++ b/ui/component/or-table/src/index.ts@@ -113,7 +113,9 @@ export class OrTable extends LitElement {<tbody class="mdc-data-table__content">${this.rows.map(item => html`<tr class="mdc-data-table__row">- ${item.map(cell => html`<td class="mdc-data-table__cell" title="${cell}">${cell}</td>`)}+ ${item.map((cell: string|number) => {+ return html`<td class="mdc-data-table__cell ${classMap({"mdc-data-table__cell--numeric": typeof cell === "number"})}" title="${cell}">${cell}</td>`;+ })}</tr>`)}</tbody>