Require every field in router variants to be present in the route in the web history (#2159)
* require every field to be present in the URL in the web history * remove desktop only extra field from the simple routes example
This commit is contained in:
1 parent
329c323b35
commit
e8491d5cf4
4 files changed
+42
-7
No files matched your search
@@ -65,17 +65,16 @@ fn UserFrame(user_id: usize) -> Element {
|
||||
}
|
||||
|
||||
#[component]
|
||||
fn Route1(user_id: usize, dynamic: usize, query: String, extra: String) -> Element {
|
||||
fn Route1(user_id: usize, dynamic: usize, query: String) -> Element {
|
||||
rsx! {
|
||||
pre {
|
||||
"Route1{{\n\tuser_id:{user_id},\n\tdynamic:{dynamic},\n\tquery:{query},\n\textra:{extra}\n}}"
|
||||
"Route1{{\n\tuser_id:{user_id},\n\tdynamic:{dynamic},\n\tquery:{query}\n}}"
|
||||
}
|
||||
Link {
|
||||
to: Route::Route1 {
|
||||
user_id,
|
||||
dynamic,
|
||||
query: String::new(),
|
||||
extra: extra.clone() + ".",
|
||||
},
|
||||
"Route1 with extra+\".\""
|
||||
}
|
||||
@@ -191,7 +190,6 @@ enum Route {
|
||||
user_id: usize,
|
||||
dynamic: usize,
|
||||
query: String,
|
||||
extra: String,
|
||||
},
|
||||
#[route("/hello_world")]
|
||||
// You can opt out of the layout by using the `!` prefix
|
||||
|
||||
Reference in new issue
Block a user