♻️ (pagetop): setup() recibe &mut Context
Antes sólo mutaba el propio componente; ahora también puede aplicar ajustes síncronos sobre el Context, visibles para las extensiones que intercepten BeforeRender. La frontera con prepare() pasa a ser de sincronía, no de qué puede mutar cada uno.
This commit is contained in:
parent
f2a7507317
commit
1e2d171805
31 changed files with 71 additions and 59 deletions
|
|
@ -79,7 +79,7 @@ impl Crumb {
|
|||
}
|
||||
|
||||
// Normaliza la clase base según el papel del elemento. Sólo lo usa `Breadcrumb`.
|
||||
pub(super) fn setup(&mut self, _cx: &Context) {
|
||||
pub(super) fn setup(&mut self, _cx: &mut Context) {
|
||||
if *self.is_current() {
|
||||
self.alter_prop(PropsOp::prepend_classes("active"))
|
||||
.alter_prop(PropsOp::set("aria-current", "page"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue