victos / angular-opensource

angular opensource modules
MIT License
20 stars 21 forks source link

Busy appearing across components #4

Closed ttiamus closed 6 years ago

ttiamus commented 6 years ago

I just updated from Angular 5.2 to 6, and in support of that upgraded to "ng-busy": "^6.0.0-rc1".

I have a page that gets a list of objects. It iterates over that list and creates a component for each of the objects. Each version of that component has a button to export an excel file related to that object. Each component also has a busy div like

<div [ngBusy]="{busy: fileDownload}">

On button click, this method runs

exportMatchResults() { this.fileDownload = this.matchingService.downloadMatchResults(this.result.id, ${this.result.dataSource.name}-${new Date().toLocaleString()}).subscribe(); }

On the previous version everything was self contained into the component, such that when I click the export in a single component, the busy throbber only appears over that specific component. After the update, when clicking any export, ALL busy throbbers appear. I think this may be related to the same named subscription, even though they are in different components, or if it is somehow registering all busy's on the page to the same throbber.

Any thoughts on why this is happening? I've attached a couple of images to demonstrate what the page looks like and the throbber behavior.

matching throbbers match

victos commented 6 years ago

Hi @ttiamus The new version 6.0.0-rc3 have fix the issue.

ttiamus commented 6 years ago

Just tested and it appears to be working. Thanks!