@inertiajs/core 2.3.7 → 2.3.8
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.esm.js +5 -3
- package/dist/index.esm.js.map +2 -2
- package/dist/index.js +5 -3
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/types/infiniteScroll/data.d.ts +1 -0
- package/types/types.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -792,7 +792,7 @@ function mergeDataIntoQueryString(method, href, data, qsArrayFormat = "brackets"
|
|
|
792
792
|
const hasHash = href.toString().includes("#");
|
|
793
793
|
const url = new URL(href.toString(), typeof window === "undefined" ? "http://localhost" : window.location.toString());
|
|
794
794
|
if (hasDataForQueryString) {
|
|
795
|
-
const hasIndices = /\[\d+\]/.test(url.search);
|
|
795
|
+
const hasIndices = /\[\d+\]/.test(decodeURIComponent(url.search));
|
|
796
796
|
const parseOptions = { ignoreQueryPrefix: true, allowSparse: true };
|
|
797
797
|
url.search = qs.stringify(
|
|
798
798
|
{ ...qs.parse(url.search, parseOptions), ...data },
|
|
@@ -1444,7 +1444,7 @@ var InitialVisit = class {
|
|
|
1444
1444
|
fireNavigateEvent(page2);
|
|
1445
1445
|
const flash = page2.flash;
|
|
1446
1446
|
if (Object.keys(flash).length > 0) {
|
|
1447
|
-
fireFlashEvent(flash);
|
|
1447
|
+
queueMicrotask(() => fireFlashEvent(flash));
|
|
1448
1448
|
}
|
|
1449
1449
|
});
|
|
1450
1450
|
}
|
|
@@ -3084,6 +3084,7 @@ var useInfiniteScrollData = (options) => {
|
|
|
3084
3084
|
const removeEventListener = router.on("success", (event) => {
|
|
3085
3085
|
if (state.component === event.detail.page.component && getScrollPropFromCurrentPage().reset) {
|
|
3086
3086
|
resetState();
|
|
3087
|
+
options.onReset?.();
|
|
3087
3088
|
}
|
|
3088
3089
|
});
|
|
3089
3090
|
const getScrollPropKeyForSide = (side) => {
|
|
@@ -3500,7 +3501,8 @@ function useInfiniteScroll(options) {
|
|
|
3500
3501
|
onCompleteNextRequest: (loadedPage) => {
|
|
3501
3502
|
options.onCompleteNextRequest();
|
|
3502
3503
|
requestAnimationFrame(() => elementManager.processServerLoadedElements(loadedPage), 2);
|
|
3503
|
-
}
|
|
3504
|
+
},
|
|
3505
|
+
onReset: options.onDataReset
|
|
3504
3506
|
});
|
|
3505
3507
|
const addScrollPreservationCallbacks = (reloadOptions) => {
|
|
3506
3508
|
const { captureScrollPosition, restoreScrollPosition } = scrollPreservation.createCallbacks();
|