@stoker-platform/web-app 0.5.149 → 0.5.150
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/CHANGELOG.md +7 -1
- package/package.json +1 -1
- package/src/List.tsx +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# @stoker-platform/web-app
|
|
2
2
|
|
|
3
|
+
## 0.5.150
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: fix page number / count when search present
|
|
8
|
+
|
|
3
9
|
## 0.5.149
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
6
12
|
|
|
7
|
-
- fix: apply isMobile condition on
|
|
13
|
+
- fix: apply isMobile condition on initial retrieval
|
|
8
14
|
|
|
9
15
|
## 0.5.148
|
|
10
16
|
|
package/package.json
CHANGED
package/src/List.tsx
CHANGED
|
@@ -812,6 +812,9 @@ export function List({
|
|
|
812
812
|
const timer = setTimeout(() => {
|
|
813
813
|
if (isInitialized && fullTextSearch && !isPreloadCacheEnabled && !isServerReadOnly) {
|
|
814
814
|
backToStart()
|
|
815
|
+
} else if (isInitialized && (isPreloadCacheEnabled || isServerReadOnly)) {
|
|
816
|
+
setPageIndex(0)
|
|
817
|
+
setState(`collection-page-number-${labels.collection.toLowerCase()}`, "page", 1)
|
|
815
818
|
}
|
|
816
819
|
}, 750)
|
|
817
820
|
return () => clearTimeout(timer)
|
|
@@ -950,13 +953,13 @@ export function List({
|
|
|
950
953
|
}
|
|
951
954
|
}
|
|
952
955
|
} else if (isInitialized && (isPreloadCacheEnabled || isServerReadOnly)) {
|
|
953
|
-
const newPageCount = Math.ceil(
|
|
956
|
+
const newPageCount = Math.ceil(searchList.length / pageSize) || 1
|
|
954
957
|
if (newPageCount !== pageCount) {
|
|
955
958
|
setPageCount(newPageCount)
|
|
956
959
|
}
|
|
957
960
|
}
|
|
958
961
|
}
|
|
959
|
-
}, [list])
|
|
962
|
+
}, [list, searchList])
|
|
960
963
|
|
|
961
964
|
const nextPage = useCallback(() => {
|
|
962
965
|
if (isLoading) return
|