-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: improve paging of search results (DEV-2468) #1995
feat: improve paging of search results (DEV-2468) #1995
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to talk about it with everybody to think about using a lib to do this
@@ -93,7 +93,10 @@ import { sortByKeys } from './sortByKeys'; | |||
<app-incoming-standoff-link-value | |||
*ngIf="(incomingLinks$ | async)?.length > 0" | |||
[links]="incomingLinks$ | async"></app-incoming-standoff-link-value> | |||
<dasch-swiss-app-pager #pager (pageChanged)="pageChanged()"></dasch-swiss-app-pager> | |||
<dasch-swiss-app-incoming-resource-pager |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dasch-swiss-app-incoming-resource-pager
why don't you call it app-incoming-resource-pager ? or dasch-swiss-incoming-resource-pager?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because I only added the "incoming-resource" to be more precise. The "dasch-swiss" was once the convention and I simply kept it.
@@ -145,7 +148,7 @@ export class PropertiesDisplayComponent implements OnChanges, OnDestroy { | |||
@Output() afterResourceDeleted = new EventEmitter(); | |||
|
|||
@ViewChild('pager', { static: false }) | |||
pagerComponent: PagerComponent | undefined; | |||
pagerComponent: IncomingResourcePagerComponent | undefined; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could say that it IS defined (remove undefined), right ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe, that component was not of my concern.
return this.lastItemOfPage ? this.lastItemOfPage : this.pageSize * (this._pageIndex + 1); | ||
} | ||
|
||
turnPage(dir: 1 | -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changePage rather than turnPage ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree.
<!-- container with search results --> | ||
<div class="list-view-container"> | ||
<dasch-swiss-app-progress-indicator *ngIf="loading"></dasch-swiss-app-progress-indicator> | ||
<div *ngIf="!loading && (numberOfAllResults > 0 && resources)"> | ||
<dasch-swiss-app-pager (pageIndexChanged)="doSearch($event)" [numberOfAllResults]="numberOfAllResults"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use the one tag version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also why not call it dasch-swiss-pager
resolves DEV-2468, DEV-4504