@shoplflow/base 0.28.1 → 0.28.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +5 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -3921,7 +3921,8 @@ var Pagination = (_a) => {
|
|
|
3921
3921
|
nextPage,
|
|
3922
3922
|
gotoPage,
|
|
3923
3923
|
leftSource,
|
|
3924
|
-
rightSource
|
|
3924
|
+
rightSource,
|
|
3925
|
+
totalCount
|
|
3925
3926
|
} = _b, rest = __objRest(_b, [
|
|
3926
3927
|
"currentPage",
|
|
3927
3928
|
"pageCount",
|
|
@@ -3931,9 +3932,10 @@ var Pagination = (_a) => {
|
|
|
3931
3932
|
"nextPage",
|
|
3932
3933
|
"gotoPage",
|
|
3933
3934
|
"leftSource",
|
|
3934
|
-
"rightSource"
|
|
3935
|
+
"rightSource",
|
|
3936
|
+
"totalCount"
|
|
3935
3937
|
]);
|
|
3936
|
-
const pageTotalCount = Math.ceil(itemsTotalCount / Number(pageSize));
|
|
3938
|
+
const pageTotalCount = totalCount != null ? totalCount : Math.ceil(itemsTotalCount / Number(pageSize));
|
|
3937
3939
|
const showLeftEllipsis = currentPage > pageCount - 1;
|
|
3938
3940
|
const showRightEllipsis = currentPage < pageTotalCount && Math.ceil((currentPage + 1) / pageCount) < Math.ceil(pageTotalCount / pageCount);
|
|
3939
3941
|
const canPreviousPage = currentPage > 0;
|