Project

General

Profile

« Previous | Next » 

Revision 56496

Registrations Admin Page: on 'items per page' change, page resets to 0 now

View differences:

registration.component.ts
77 77
    this.getRegisteredRepositories();
78 78
  }
79 79

  
80
  handleChangeAndResetPage() {
81
    this.dataForm.get('page').setValue(0);
82
    this.getRegisteredRepositories();
83
  }
84

  
80 85
  getCountryName(countryCode): string {
81 86
    for (const country of Object.values(this.countries)) {
82 87
      if (country.code === countryCode) {
......
94 99

  
95 100
  nextPage() {
96 101
    /** remove when page total is fixed!!! **/
97
    this.repoService.searchRegisteredRepositories(this.dataForm.get('country').value, this.dataForm.get('typology').value, this.dataForm.get('englishname').value,
102
      this.repoService.searchRegisteredRepositories(this.dataForm.get('country').value, this.dataForm.get('typology').value, this.dataForm.get('englishname').value,
98 103
      this.dataForm.get('officialname').value, this.dataForm.get('requestSortBy').value, this.dataForm.get('order').value, +this.dataForm.get('page').value + 1,
99 104
      this.dataForm.get('pageSize').value).subscribe(
100 105
      suc => this.thisIsForBadUse = suc,
101 106
      error => console.log(error),
102 107
      () => {
103
        console.log(this.thisIsForBadUse.length );
108
        console.log(this.thisIsForBadUse.length);
104 109
        if (!(this.thisIsForBadUse.length === 0)) {
105 110
          console.log('got here');
106 111
          this.dataForm.get('page').setValue(+this.dataForm.get('page').value + 1);

Also available in: Unified diff