solid-navigator 0.3.5 → 0.3.6
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/dev.js +2 -2
- package/dist/dev.jsx +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/index.jsx +2 -2
- package/package.json +1 -1
package/dist/dev.js
CHANGED
|
@@ -306,12 +306,12 @@ var Navigate = (props) => {
|
|
|
306
306
|
function useSearchParams() {
|
|
307
307
|
const context = useRouterContext();
|
|
308
308
|
const navigate = useNavigate();
|
|
309
|
-
const updateQuery = (query) => {
|
|
309
|
+
const updateQuery = (query, options) => {
|
|
310
310
|
context.setQuery(reconcile(query));
|
|
311
311
|
const url = new URL(window.location.href);
|
|
312
312
|
const newSearch = new URLSearchParams(context.query);
|
|
313
313
|
url.search = newSearch.toString();
|
|
314
|
-
navigate(url.pathname + url.search + url.hash);
|
|
314
|
+
navigate(url.pathname + url.search + url.hash, options);
|
|
315
315
|
};
|
|
316
316
|
return [context.location.query, updateQuery];
|
|
317
317
|
}
|
package/dist/dev.jsx
CHANGED
|
@@ -312,12 +312,12 @@ var Navigate = (props) => {
|
|
|
312
312
|
function useSearchParams() {
|
|
313
313
|
const context = useRouterContext();
|
|
314
314
|
const navigate = useNavigate();
|
|
315
|
-
const updateQuery = (query) => {
|
|
315
|
+
const updateQuery = (query, options) => {
|
|
316
316
|
context.setQuery(reconcile3(query));
|
|
317
317
|
const url = new URL(window.location.href);
|
|
318
318
|
const newSearch = new URLSearchParams(context.query);
|
|
319
319
|
url.search = newSearch.toString();
|
|
320
|
-
navigate(url.pathname + url.search + url.hash);
|
|
320
|
+
navigate(url.pathname + url.search + url.hash, options);
|
|
321
321
|
};
|
|
322
322
|
return [context.location.query, updateQuery];
|
|
323
323
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ declare const useNavigate: () => (path: string, options?: NavigateOptions | unde
|
|
|
19
19
|
declare const Navigate: (props: {
|
|
20
20
|
href: string;
|
|
21
21
|
}) => null;
|
|
22
|
-
declare function useSearchParams<T = Record<string, string>>(): readonly [T, (query: T) => void];
|
|
22
|
+
declare function useSearchParams<T = Record<string, string>>(): readonly [T, (query: T, options?: NavigateOptions) => void];
|
|
23
23
|
|
|
24
24
|
declare const Outlet: (props: {
|
|
25
25
|
children?: string;
|
package/dist/index.js
CHANGED
|
@@ -304,12 +304,12 @@ var Navigate = (props) => {
|
|
|
304
304
|
function useSearchParams() {
|
|
305
305
|
const context = useRouterContext();
|
|
306
306
|
const navigate = useNavigate();
|
|
307
|
-
const updateQuery = (query) => {
|
|
307
|
+
const updateQuery = (query, options) => {
|
|
308
308
|
context.setQuery(reconcile(query));
|
|
309
309
|
const url = new URL(window.location.href);
|
|
310
310
|
const newSearch = new URLSearchParams(context.query);
|
|
311
311
|
url.search = newSearch.toString();
|
|
312
|
-
navigate(url.pathname + url.search + url.hash);
|
|
312
|
+
navigate(url.pathname + url.search + url.hash, options);
|
|
313
313
|
};
|
|
314
314
|
return [context.location.query, updateQuery];
|
|
315
315
|
}
|
package/dist/index.jsx
CHANGED
|
@@ -311,12 +311,12 @@ var Navigate = (props) => {
|
|
|
311
311
|
function useSearchParams() {
|
|
312
312
|
const context = useRouterContext();
|
|
313
313
|
const navigate = useNavigate();
|
|
314
|
-
const updateQuery = (query) => {
|
|
314
|
+
const updateQuery = (query, options) => {
|
|
315
315
|
context.setQuery(reconcile3(query));
|
|
316
316
|
const url = new URL(window.location.href);
|
|
317
317
|
const newSearch = new URLSearchParams(context.query);
|
|
318
318
|
url.search = newSearch.toString();
|
|
319
|
-
navigate(url.pathname + url.search + url.hash);
|
|
319
|
+
navigate(url.pathname + url.search + url.hash, options);
|
|
320
320
|
};
|
|
321
321
|
return [context.location.query, updateQuery];
|
|
322
322
|
}
|