♻️ (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:
parent
213aa18b12
commit
bf4c635e59
21 changed files with 171 additions and 245 deletions
|
|
@ -99,7 +99,7 @@ impl Column {
|
|||
|
||||
html! {
|
||||
th (self.props()) scope="col" aria-sort=(aria_sort) {
|
||||
a href=[sort.href().as_str()] (link_props) { (label) }
|
||||
a href=[sort.href().as_deref()] (link_props) { (label) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use crate::prelude::*;
|
|||
/// .with_prop(PropsOp::set("data-sort", "email"));
|
||||
///
|
||||
/// assert_eq!(link.props().get_id(), Some("sort-email".to_string()));
|
||||
/// assert_eq!(link.href().as_str(), Some("/admin/users?sort=email"));
|
||||
/// assert_eq!(link.href().as_deref(), Some("/admin/users?sort=email"));
|
||||
/// assert_eq!(link.dir(), Some(&SortDir::Desc));
|
||||
/// ```
|
||||
///
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue