Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
fix(base-remote-repository): Fix error in remoteCreate method
Browse files Browse the repository at this point in the history
  • Loading branch information
EndyKaufman committed Oct 30, 2017
1 parent 686c4ac commit a440efa
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export class BaseRemoteRepositoryService extends BaseLocalRepositoryService {
this.repositoryHelper.createItemRequest(this, item)
.map((response: any) => this.transformModel(this.repositoryHelper.itemResponse(this, response, item)))
.subscribe((createdItem: any) => {
this.afterCreate(result, item, null, null);
this.afterCreate(result, createdItem, null, null);
}, (error: any) => {
this.afterCreate(result, item, null, error);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,13 @@ export class BaseResourcesGridComponent extends BaseComponent {
const filter: any = {};
if (this.cachedResourcesService) {
this.cachedResourcesService.ignoreCache = ignoreCache;
if (this.mockedItems) {
this.cachedResourcesService.mockedItems = this.mockedItems;
}
this.cachedResourcesService.loadAll(this.searchText, filter);
this.searchWithMockedItems(filter);
}
}
searchWithMockedItems(filter: any) {
if (this.mockedItems) {
this.cachedResourcesService.mockedItems = this.mockedItems;
}
this.cachedResourcesService.loadAll(this.searchText, filter);
}
}

0 comments on commit a440efa

Please # to comment.