mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
subscribe after loadAll
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
d862995761
commit
3812fc1d85
@ -60,10 +60,12 @@ export class WorkloadsOverview extends React.Component<Props> {
|
|||||||
stores.push(eventStore);
|
stores.push(eventStore);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const unsubscribeList: Array<() => void> = [];
|
||||||
|
|
||||||
for (const store of stores) {
|
for (const store of stores) {
|
||||||
await store.loadAll();
|
await store.loadAll();
|
||||||
|
unsubscribeList.push(store.subscribe());
|
||||||
}
|
}
|
||||||
const unsubscribeList = stores.map(store => store.subscribe());
|
|
||||||
|
|
||||||
await when(() => this.isUnmounting);
|
await when(() => this.isUnmounting);
|
||||||
unsubscribeList.forEach(dispose => dispose());
|
unsubscribeList.forEach(dispose => dispose());
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user