Commit 1aeb03c0a2dbf71bcb08aa6ed09e67e298ee2c2e
1 parent
ccd316a9
UI: Fixed updated device profiles table after added new profiles
Showing
1 changed file
with
9 additions
and
4 deletions
... | ... | @@ -36,7 +36,6 @@ import { |
36 | 36 | import { DeviceProfileService } from '@core/http/device-profile.service'; |
37 | 37 | import { DeviceProfileComponent } from '@home/components/profile/device-profile.component'; |
38 | 38 | import { DeviceProfileTabsComponent } from './device-profile-tabs.component'; |
39 | -import { Observable } from 'rxjs'; | |
40 | 39 | import { MatDialog } from '@angular/material/dialog'; |
41 | 40 | import { |
42 | 41 | AddDeviceProfileDialogComponent, |
... | ... | @@ -138,8 +137,8 @@ export class DeviceProfilesTableConfigResolver implements Resolve<EntityTableCon |
138 | 137 | return actions; |
139 | 138 | } |
140 | 139 | |
141 | - addDeviceProfile(): Observable<DeviceProfile> { | |
142 | - return this.dialog.open<AddDeviceProfileDialogComponent, AddDeviceProfileDialogData, | |
140 | + addDeviceProfile() { | |
141 | + this.dialog.open<AddDeviceProfileDialogComponent, AddDeviceProfileDialogData, | |
143 | 142 | DeviceProfile>(AddDeviceProfileDialogComponent, { |
144 | 143 | disableClose: true, |
145 | 144 | panelClass: ['tb-dialog', 'tb-fullscreen-dialog'], |
... | ... | @@ -147,7 +146,13 @@ export class DeviceProfilesTableConfigResolver implements Resolve<EntityTableCon |
147 | 146 | deviceProfileName: null, |
148 | 147 | transportType: null |
149 | 148 | } |
150 | - }).afterClosed(); | |
149 | + }).afterClosed().subscribe( | |
150 | + (res) => { | |
151 | + if (res) { | |
152 | + this.config.table.updateData(); | |
153 | + } | |
154 | + } | |
155 | + ); | |
151 | 156 | } |
152 | 157 | |
153 | 158 | setDefaultDeviceProfile($event: Event, deviceProfile: DeviceProfile) { | ... | ... |