From c5053013304986100a788cc2131daf7afc36773e Mon Sep 17 00:00:00 2001 From: Andrii Shvaika Date: Fri, 10 Apr 2026 19:20:11 +0300 Subject: [PATCH] fix(iot-hub): load installed devices when activeType input is set When the browse component is used on /iot-hub/devices (via items page component), the parent sets config in its own ngOnInit, so the child's @Input setter fires AFTER the child's ngOnInit. The DEVICE-specific loading (vendors + installed items) in ngOnInit never executed because activeType was still the default WIDGET at that point. Fix: trigger loading directly in the activeType setter when the value changes to DEVICE. --- .../home/components/iot-hub/iot-hub-browse.component.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts index 18efd185e4..04dbc14bec 100644 --- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts +++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-browse.component.ts @@ -70,6 +70,10 @@ export class TbIotHubBrowseComponent implements OnInit, OnDestroy { @Input() set activeType(value: ItemType) { if (value && value !== this._activeType) { this._activeType = value; + if (value === ItemType.DEVICE) { + this.loadVendors(); + this.loadInstalledDevices(); + } } } get activeType(): ItemType {