Project

General

Profile

« Previous | Next » 

Revision 62830

View differences:

countries-table.component.ts
21 21

  
22 22
  ngOnChanges() {
23 23
    this.countries.sort((a, b) => (a['name'] > b['name']) ? 1 : -1);
24
    console.log('countries ->', this.countries);
24 25
  }
25 26

  
26 27
  sortBy(field: string) {
......
33 34

  
34 35
    this.isSortedBy = field;
35 36

  
36
    if (field === 'pid' || field === 'licence' || field === 'gold' || field === 'green') {
37
    if (field === 'pid' || field === 'licence' || field === 'gold' || field === 'green' || field === 'cc_licence' || field === 'abstract'
38
    || field === 'funders_collab' || field === 'projects_collab' || field === 'authors_collab') {
37 39
      if (this.isDescending) {
38 40
        if (this.isPercentage) {
39 41
          this.countries.sort((a, b) => b[field].percentage - a[field].percentage);

Also available in: Unified diff