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
UI fix for chart widget settings being reset (#2461)
Martin Peeters07a6debdc2ac
diff --git a/ui/component/or-dashboard-builder/src/settings/chart-settings.ts b/ui/component/or-dashboard-builder/src/settings/chart-settings.tsindex 6b8366ba1..8ae5f29bf 100644--- a/ui/component/or-dashboard-builder/src/settings/chart-settings.ts+++ b/ui/component/or-dashboard-builder/src/settings/chart-settings.ts@@ -356,7 +356,7 @@ export class ChartSettings extends WidgetSettings {// we should remove the settings references for the attributes that got removed.// Also update the WidgetConfig attributeRefs field as usualprotected onAttributesSelect(ev: AttributesSelectEvent) {- const removedAttributeRefs = this.widgetConfig.attributeRefs.filter(ar => !ev.detail.attributeRefs.includes(ar));+ const removedAttributeRefs = this.widgetConfig.attributeRefs.filter(ref => !ev.detail.attributeRefs.some(r => r.id === ref.id && r.name === ref.name));removedAttributeRefs.forEach(raf => {this.removeFromAttributeConfig(raf);