mirror of
https://github.com/leptos-rs/leptos
synced 2024-11-10 06:44:17 +00:00
fix: use current pathname for create_query_signal
(#1508)
This commit is contained in:
parent
f01b982cff
commit
3a98bdb3c2
1 changed files with 2 additions and 2 deletions
|
@ -51,7 +51,7 @@ where
|
|||
let key = key.into();
|
||||
let query_map = use_query_map(cx);
|
||||
let navigate = use_navigate(cx);
|
||||
let route = use_route(cx);
|
||||
let location = use_location(cx);
|
||||
|
||||
let get = create_memo(cx, {
|
||||
let key = key.clone();
|
||||
|
@ -72,7 +72,7 @@ where
|
|||
}
|
||||
}
|
||||
let qs = new_query_map.to_query_string();
|
||||
let path = route.path();
|
||||
let path = location.pathname.get();
|
||||
let new_url = format!("{path}{qs}");
|
||||
let _ = navigate(&new_url, NavigateOptions::default());
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue