♻️ (pagetop): Incorpora Context al render de Props

This commit is contained in:
Manuel Cillero 2026-09-05 00:19:39 +02:00
parent a2b3ae2eb8
commit ab1d4f0efb
49 changed files with 212 additions and 133 deletions

View file

@ -89,13 +89,13 @@ impl Column {
let label = self.label().using(cx);
let Some(sort) = self.sort() else {
return html! { th (self.props()) scope="col" { (label) } };
return html! { th (self.props().unpack(cx)) scope="col" { (label) } };
};
let (aria_sort, link_props) = sort.header_attrs();
html! {
th (self.props()) scope="col" aria-sort=(aria_sort) {
a href=[sort.href().as_deref()] (link_props) { (label) }
th (self.props().unpack(cx)) scope="col" aria-sort=(aria_sort) {
a href=[sort.href().as_deref()] (link_props.unpack(cx)) { (label) }
}
}
}

View file

@ -81,7 +81,7 @@ impl Component for Table {
Ok(html! {
div.table-responsive {
table (self.props()) {
table (self.props().unpack(cx)) {
@if !self.columns().is_empty() {
thead {
tr {
@ -94,9 +94,9 @@ impl Component for Table {
@if !self.rows().is_empty() {
tbody {
@for row in self.rows() {
tr (row.props()) {
tr (row.props().unpack(cx)) {
@for cell in row.cells() {
td (cell.props()) { (cell.children().render(cx).await) }
td (cell.props().unpack(cx)) { (cell.children().render(cx).await) }
}
}
}