mirror of
https://github.com/pocketbase/pocketbase.git
synced 2026-05-19 14:21:28 -04:00
fixed 0 total count on page back/forward navigation
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
## v0.37.3 (WIP)
|
||||
|
||||
- Fixed 0 total count on page back/forward navigation.
|
||||
|
||||
|
||||
## v0.37.2
|
||||
|
||||
- Fixed autoexpandable input in Firefox ([#7648](https://github.com/pocketbase/pocketbase/discussions/7648)).
|
||||
|
||||
2
ui/.env
2
ui/.env
@@ -11,4 +11,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs"
|
||||
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
|
||||
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
|
||||
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
|
||||
PB_VERSION = "v0.37.2"
|
||||
PB_VERSION = "v0.37.3-dev"
|
||||
|
||||
81
ui/dist/assets/index-CoBufq4Q.js
vendored
Normal file
81
ui/dist/assets/index-CoBufq4Q.js
vendored
Normal file
File diff suppressed because one or more lines are too long
81
ui/dist/assets/index-Un_20Bdf.js
vendored
81
ui/dist/assets/index-Un_20Bdf.js
vendored
File diff suppressed because one or more lines are too long
2
ui/dist/index.html
vendored
2
ui/dist/index.html
vendored
@@ -13,7 +13,7 @@
|
||||
|
||||
<!-- prism -->
|
||||
<script src="./libs/prism/prism.js" data-manual></script>
|
||||
<script type="module" crossorigin src="./assets/index-Un_20Bdf.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-CoBufq4Q.js"></script>
|
||||
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-Cdd8TSHO.css">
|
||||
</head>
|
||||
|
||||
@@ -5,9 +5,10 @@ const FILTER_QUERY_KEY = "filter";
|
||||
const COLLECTION_QUERY_KEY = "collection";
|
||||
const RECORD_QUERY_KEY = "record";
|
||||
const LAST_ACTIVE_STORAGE_KEY = "pbLastActiveCollection";
|
||||
const TOTAL_COUNT_REQUEST_KEY = "recordsTotalCountRequest";
|
||||
|
||||
export function pageCollections(route) {
|
||||
const uniqueId = "page_collections_" + app.utils.randomString();
|
||||
|
||||
app.store.activeCollection = route.query[COLLECTION_QUERY_KEY]?.[0]
|
||||
|| window.localStorage.getItem(LAST_ACTIVE_STORAGE_KEY);
|
||||
|
||||
@@ -34,7 +35,8 @@ export function pageCollections(route) {
|
||||
);
|
||||
|
||||
const result = await app.pb.collection(app.store.activeCollection.name).getList(1, 1, {
|
||||
requestKey: TOTAL_COUNT_REQUEST_KEY,
|
||||
// use a per page unique id and not a global constant to prevent race issues with the async unmount
|
||||
requestKey: uniqueId,
|
||||
filter: normalizedFilter,
|
||||
fields: "id",
|
||||
});
|
||||
@@ -184,7 +186,7 @@ export function pageCollections(route) {
|
||||
}
|
||||
},
|
||||
onunmount: () => {
|
||||
app.pb.cancelRequest(TOTAL_COUNT_REQUEST_KEY);
|
||||
app.pb.cancelRequest(uniqueId);
|
||||
|
||||
watchers.forEach((w) => w?.unwatch());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user