Commit 331a9a52 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰 Committed by Tomek Mrugalski

[#164] hostsPageComponent test fixed

parent 9996fb51
......@@ -58,14 +58,19 @@ export class HostsPageComponent implements OnInit {
this.updateOurQueryParams(ssParams)
// subscribe to subsequent changes to query params
this.route.queryParamMap.subscribe((params) => {
this.updateOurQueryParams(params)
let event = { first: 0, rows: 10 }
if (this.hostsTable) {
event = this.hostsTable.createLazyLoadMetadata()
this.route.queryParamMap.subscribe(
(params) => {
this.updateOurQueryParams(params)
let event = { first: 0, rows: 10 }
if (this.hostsTable) {
event = this.hostsTable.createLazyLoadMetadata()
}
this.loadHosts(event)
},
(error) => {
console.log(error)
}
this.loadHosts(event)
})
)
}
updateOurQueryParams(params) {
......@@ -95,7 +100,11 @@ export class HostsPageComponent implements OnInit {
.subscribe((data) => {
this.hosts = data.items
this.totalHosts = data.total
})
},
(error) => {
console.log(error)
}
)
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment