mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2026-03-02 05:36:38 +00:00
Created helper functions to determine the key and if a page is disabled on a progressive paginator
This commit is contained in:
@@ -21,3 +21,7 @@ export const progressivePagination = (currentPage, pageCount) => {
|
||||
|
||||
return pages;
|
||||
};
|
||||
|
||||
export const keyForPage = (pageNumber, index) => pageNumber !== ELLIPSIS ? pageNumber : `${pageNumber}_${index}`;
|
||||
|
||||
export const isPageDisabled = (pageNumber) => pageNumber === ELLIPSIS;
|
||||
|
||||
Reference in New Issue
Block a user