♻️ (pagetop): Sustituye Attr<T> por Option<T>

`Attr<T>` no aportaba nada sobre `Option<T>` directo: `Getters` ya trata
los campos `Option<T>` como caso especial (`Option<&T>`, o `Option<T>`
con `#[getters(copy)]`) y `#[builder_fn]` funciona igual sobre ellos.
This commit is contained in:
Manuel Cillero 2026-08-17 05:28:12 +02:00
parent 213aa18b12
commit bf4c635e59
21 changed files with 171 additions and 245 deletions

View file

@ -203,11 +203,11 @@ impl Component for Pager {
return Ok(html! {});
}
let page = self.current_page().clamp(1, total_pages);
let base_path = self.base_path().as_str().unwrap_or_default();
let base_path = self.base_path().as_deref().unwrap_or("");
// Ruta común a los enlaces del paginador, con los parámetros de `extra_query` añadidos a
// `base_path`. Pasa por `cx.route()` para preservar el parámetro `lang` si corresponde.
let mut route = cx.route(base_path.to_owned());
let mut route = cx.route(base_path);
for (key, value) in self.extra_query() {
route.alter_param(key, value);
}