@ethlete/query 6.0.0-next.56 → 6.0.0-next.58
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 +12 -0
- package/fesm2022/ethlete-query.mjs +13 -1
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/package.json +6 -1
- package/types/ethlete-query.d.ts +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ethlete/query
|
|
2
2
|
|
|
3
|
+
## 6.0.0-next.58
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Skip the router navigation of a query form URL write when the URL already holds the form values. The skipped same-URL navigation made the router scroll to the top after a back navigation restored the scroll position.
|
|
8
|
+
|
|
9
|
+
## 6.0.0-next.57
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- `defineQueryForm().observe()` takes `navigationExtras` (`scroll`, `state`) for each navigation that writes the form's params. With `scroll: 'manual'`, a debounced search no longer scrolls the page to the top under `withInMemoryScrolling`.
|
|
14
|
+
|
|
3
15
|
## 6.0.0-next.56
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
|
@@ -8870,7 +8870,7 @@ const createTrackingFeature = (context, config) => runInInjectionContext(context
|
|
|
8870
8870
|
|
|
8871
8871
|
// Generated from package.json by tools/scripts/generate-version.js - do not edit.
|
|
8872
8872
|
/** The version of `@ethlete/query` this build was cut from. */
|
|
8873
|
-
const QUERY_VERSION = '6.0.0-next.
|
|
8873
|
+
const QUERY_VERSION = '6.0.0-next.58';
|
|
8874
8874
|
|
|
8875
8875
|
const ethlete = {};
|
|
8876
8876
|
let app = null;
|
|
@@ -18759,7 +18759,19 @@ const defineQueryForm = (config) => {
|
|
|
18759
18759
|
if (extras.version !== undefined)
|
|
18760
18760
|
writes.set(urlNavigationMarker, extras.version);
|
|
18761
18761
|
const info = writes.size ? { queryFormWrites: writes } : undefined;
|
|
18762
|
+
// Even a skipped same-URL navigation makes the router's scroller jump to the top, which undoes the
|
|
18763
|
+
// scroll position a back navigation just restored.
|
|
18764
|
+
if (!pending) {
|
|
18765
|
+
const target = router.createUrlTree([], {
|
|
18766
|
+
queryParams,
|
|
18767
|
+
queryParamsHandling: 'replace',
|
|
18768
|
+
fragment: base.fragment ?? undefined,
|
|
18769
|
+
});
|
|
18770
|
+
if (router.serializeUrl(target) === router.url)
|
|
18771
|
+
return;
|
|
18772
|
+
}
|
|
18762
18773
|
router.navigate([], {
|
|
18774
|
+
...observeOptions?.navigationExtras,
|
|
18763
18775
|
queryParams,
|
|
18764
18776
|
queryParamsHandling: 'replace',
|
|
18765
18777
|
fragment: base.fragment ?? undefined,
|