From b7f5389f2c67fea53b514b09b858bdbe14694ad5 Mon Sep 17 00:00:00 2001 From: futa-ikeda Date: Thu, 14 Nov 2024 15:29:35 -0500 Subject: [PATCH 1/2] Prevent first-page button from showing up on the first page --- .../addon/components/index-card-searcher/component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/osf-components/addon/components/index-card-searcher/component.ts b/lib/osf-components/addon/components/index-card-searcher/component.ts index bb93c47e945..ae2f24192ba 100644 --- a/lib/osf-components/addon/components/index-card-searcher/component.ts +++ b/lib/osf-components/addon/components/index-card-searcher/component.ts @@ -31,7 +31,7 @@ export default class IndexCardSearcher extends Component @tracked prevPageCursor?: string; get showFirstPageOption() { - return this.prevPageCursor !== this.firstPageCursor; + return this.hasPrevPage && this.prevPageCursor !== this.firstPageCursor; } get hasNextPage() { From 7c425cc1335a5ef5f445391fbed84bc3b4289a20 Mon Sep 17 00:00:00 2001 From: futa-ikeda Date: Thu, 14 Nov 2024 15:29:56 -0500 Subject: [PATCH 2/2] Reset page on sort or filter change --- app/institutions/dashboard/-components/object-list/component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/institutions/dashboard/-components/object-list/component.ts b/app/institutions/dashboard/-components/object-list/component.ts index 8a27082b632..35c308a169f 100644 --- a/app/institutions/dashboard/-components/object-list/component.ts +++ b/app/institutions/dashboard/-components/object-list/component.ts @@ -88,6 +88,7 @@ export default class InstitutionalObjectList extends Component