From 5144a9af4cc8bdb64249678c2e0c06ee818f9615 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 26 Jan 2023 10:32:59 +0100 Subject: [PATCH] web/elements: persist table page in URL parameters Signed-off-by: Jens Langhammer --- web/src/elements/table/Table.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/src/elements/table/Table.ts b/web/src/elements/table/Table.ts index 9a92621eb..b7120814b 100644 --- a/web/src/elements/table/Table.ts +++ b/web/src/elements/table/Table.ts @@ -119,7 +119,7 @@ export abstract class Table extends AKElement { data?: PaginatedResponse; @property({ type: Number }) - page = 1; + page = getURLParam("page", 1); @property({ type: String }) order?: string; @@ -426,6 +426,7 @@ export abstract class Table extends AKElement { .pages=${this.data?.pagination} .pageChangeHandler=${(page: number) => { this.page = page; + updateURLParams({ page: page }); this.fetch(); }} >