import { Notifier } from '@app/core'
import { RestService } from '@app/shared'
import { SortMeta } from 'primeng/api'
+import { Subject } from 'rxjs'
@Component({
selector: 'my-about-follows',
followersPagination: ComponentPagination = {
currentPage: 1,
- itemsPerPage: 40,
+ itemsPerPage: 20,
totalItems: null
}
followingsPagination: ComponentPagination = {
currentPage: 1,
- itemsPerPage: 40,
+ itemsPerPage: 20,
totalItems: null
}
order: -1
}
+ onDataSubject = new Subject<any[]>()
+
constructor (
private restService: RestService,
private notifier: Notifier,
this.followers = this.followers.concat(newFollowers)
this.followersPagination.totalItems = resultList.total
+
+ this.onDataSubject.next(newFollowers)
},
err => this.notifier.error(err.message)
this.followings = this.followings.concat(newFollowings)
this.followingsPagination.totalItems = resultList.total
+
+ this.onDataSubject.next(newFollowings)
},
err => this.notifier.error(err.message)