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
Fix table widget texts starting with a number only showing the number (#2388)
Martin Peeters95fa43bca335
diff --git a/ui/component/or-dashboard-builder/src/widgets/table-widget.ts b/ui/component/or-dashboard-builder/src/widgets/table-widget.tsindex 62ebd2e58..fa10bc70b 100644--- a/ui/component/or-dashboard-builder/src/widgets/table-widget.ts+++ b/ui/component/or-dashboard-builder/src/widgets/table-widget.ts@@ -128,7 +128,7 @@ export class TableWidget extends OrAssetWidget {if(asset.attributes && asset.attributes[attrName]) {const attributeDescriptor = AssetModelUtil.getAttributeDescriptor(attrName, asset.type!);const strValue = Util.getAttributeValueAsString(asset.attributes[attrName], attributeDescriptor, asset.type, false);- const numValue = parseFloat(strValue);+ const numValue = Number(strValue);return isNaN(numValue) ? strValue : numValue;} else {return 'N.A.'