Skip to content

Commit

Permalink
data update instead of navigation
Browse files Browse the repository at this point in the history
  • Loading branch information
Drillllll committed Jul 3, 2024
1 parent 1320489 commit 7232c8f
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ export class MapLocationListComponent implements OnInit, OnChanges {
onMapLocationDelete(mapLocationId: string) {
if (confirm("You are about to delete map location. Do you want to continue?")) {
this.mapLocationService.deleteMapLocationFromRoute(mapLocationId, this.route.id).subscribe( () => {
this.router.navigate(['yourRoutes/list'])
//this.router.navigate(['yourRoutes/list'])
this.mapLocations = this.mapLocations.filter(location => location.id !== mapLocationId);
this.mapLocationsAndImages = this.mapLocationsAndImages.filter(
locationData => locationData.mapLocation.id !== mapLocationId
);
});
}
}
Expand Down

0 comments on commit 7232c8f

Please sign in to comment.