{jobs.into_iter()
// .filter(|(_id, job)| job.class_job_parent.0 == 0)
- .map(|(_id, job)| view!{
- // {&job.abbreviation}
-
-
-
- }).collect::
>()}
+ .map(|(_id, job)| view!{
+
+ // {&job.abbreviation}
+
+
+
+
+ }).collect::>()}
}
}
@@ -165,11 +169,11 @@ pub fn CategoryItems() -> impl IntoView {
let items = create_memo(move |_| {
let cat = params()
.get("category")
- .and_then(|cat| decode(cat).ok())
+ .and_then(|cat| percent_encoding::percent_decode_str(cat).decode_utf8().ok())
.and_then(|cat| {
data.item_search_categorys
.iter()
- .find(|(_id, category)| category.name == cat)
+ .find(|(_id, category)| &category.name == &cat)
})
.map(|(id, _)| {
let items = data
@@ -185,9 +189,8 @@ pub fn CategoryItems() -> impl IntoView {
params()
.get("category")
.as_ref()
- .and_then(|cat| decode(cat).ok())
- .map(|c| c.to_string())
- .unwrap_or("Category View".to_string())
+ .and_then(|cat| percent_decode_str(cat).decode_utf8().ok())
+ .unwrap_or(Cow::from("Category View"))
.to_string()
});
view! {
@@ -341,6 +344,40 @@ pub fn QueryButton(
}>{children} }
}
+/// A URL that copies the existing query string but replaces the path
+#[component]
+pub fn APersistQuery(
+ #[prop(into)] href: TextProp,
+ children: Box