web/elements: persist table page in URL parameters
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
parent
93772e492b
commit
5144a9af4c
|
@ -119,7 +119,7 @@ export abstract class Table<T> extends AKElement {
|
|||
data?: PaginatedResponse<T>;
|
||||
|
||||
@property({ type: Number })
|
||||
page = 1;
|
||||
page = getURLParam("page", 1);
|
||||
|
||||
@property({ type: String })
|
||||
order?: string;
|
||||
|
@ -426,6 +426,7 @@ export abstract class Table<T> extends AKElement {
|
|||
.pages=${this.data?.pagination}
|
||||
.pageChangeHandler=${(page: number) => {
|
||||
this.page = page;
|
||||
updateURLParams({ page: page });
|
||||
this.fetch();
|
||||
}}
|
||||
>
|
||||
|
|
Reference in a new issue