Skip to content

Commit

Permalink
feat: geoSearchContext selector
Browse files Browse the repository at this point in the history
  • Loading branch information
petrot committed Mar 23, 2018
1 parent 27d74d0 commit f0fa370
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ export class GeoSearchSelectors {
return createSelector(this.getAllGeoSearches, (searches: IGeoSearchResponseItem[]) => (searches.find(search => (search.id === context))));
}

public getGeoSearchContext(context: string) {
return createSelector(this.getAllContexts, (searches: IGeoSearchContextState[]) => (searches.find(search => (search.id === context))));
}

public getGeoSearchResults<T extends GeoSearchableItem>(context: string, getAllSelector: ((state: object) => T[])) {
return createSelector(
getAllSelector,
Expand Down

0 comments on commit f0fa370

Please sign in to comment.