Revision 59816
Added by Argiro Kokogiannaki over 3 years ago
claimProjectSearchForm.component.ts | ||
---|---|---|
9 | 9 |
import {RangeFilter} from "../../utils/rangeFilter/rangeFilterHelperClasses.class"; |
10 | 10 |
import {SearchFields} from "../../utils/properties/searchFields"; |
11 | 11 |
import {NewSearchPageComponent} from "../../searchPages/searchUtils/newSearchPage.component"; |
12 |
import {Subscriber} from "rxjs"; |
|
12 | 13 |
|
13 | 14 |
declare var UIkit:any; |
14 | 15 |
|
... | ... | |
67 | 68 |
this.rangeFilters = RangeFilter.parse(this.rangeFields,"project"); |
68 | 69 |
|
69 | 70 |
} |
71 |
sub; |
|
72 |
ngOnDestroy() { |
|
73 |
if (this.sub instanceof Subscriber) { |
|
74 |
this.sub.unsubscribe(); |
|
75 |
} |
|
76 |
} |
|
70 | 77 |
|
71 |
|
|
72 | 78 |
search(page,size) { |
73 | 79 |
if(this.keyword.length == 0){ |
74 | 80 |
this.showResults =false; |
... | ... | |
80 | 86 |
this.prevFilters = this.filters; |
81 | 87 |
|
82 | 88 |
//searchProjects (params: string, refineParams:string, page: number, size: number, refineFields:string[] , properties:EnvProperties ):any { |
83 |
this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe( |
|
89 |
this.sub = this._projectService.searchProjects(this.createOpenaireQueryParams(),(page==1)? this.refineFieldsQuery:null, page, size, (page==1)?this.refineFields:[], this.properties).subscribe(
|
|
84 | 90 |
data => { |
85 | 91 |
if(data != null) { |
86 | 92 |
this.openaireResultsPage=page; |
Also available in: Unified diff
[Library|Trunk]
code clean up:
-remove app.* files from library
-remove unused imports, code, files (Old search pages for results, dataproviders, map search page, etc)
-remove Freeguard from modules
-unsubscribe all subscriptions
-Services: configuration, isvocabularies, user management: unsubscribe from app component or the component that uses them (clearSubscriptions())
-Fetchers: unsubscribe from the component that uses them (clearSubscriptions())