diff --git a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-search.component.ts b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-search.component.ts
index 1c70ed2370..2ce6a552c7 100644
--- a/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-search.component.ts
+++ b/ui-ngx/src/app/modules/home/components/iot-hub/iot-hub-search.component.ts
@@ -219,12 +219,12 @@ export class TbIotHubSearchComponent implements OnInit, OnDestroy {
}
this.resizeSubscription = this.resizeSubject.pipe(debounceTime(150)).subscribe(() => {
const before = this.pageSizeOptions[0];
+ // Keep the same first item in view, not the same page number.
+ const firstItem = this.pageIndex * this.pageSize;
this.measureCols();
if (this.pageSizeOptions[0] === before) {
return;
}
- // Keep the same first item in view, not the same page number.
- const firstItem = this.pageIndex * this.pageSize;
this.pageSize = this.pageSizeOptions[0];
this.pageIndex = Math.floor(firstItem / this.pageSize);
this.loadResults();
diff --git a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.html b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.html
index d244bbe06a..b2b785ceae 100644
--- a/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.html
+++ b/ui-ngx/src/app/modules/home/pages/iot-hub/iot-hub-home.component.html
@@ -72,6 +72,13 @@
+ } @else if (searchFailed) {
+
} @else if (searchResults.length === 0 && searchLoaded) {