⏪ Revierte uso de writable() en componentes hijo
This commit is contained in:
parent
6cb67027f6
commit
7e5965176b
1 changed files with 5 additions and 5 deletions
|
|
@ -2,7 +2,7 @@ use crate::core::component::{ComponentTrait, Context};
|
||||||
use crate::html::{html, Markup};
|
use crate::html::{html, Markup};
|
||||||
use crate::{fn_builder, UniqueId};
|
use crate::{fn_builder, UniqueId};
|
||||||
|
|
||||||
use std::sync::{Arc, RwLock, RwLockWriteGuard};
|
use std::sync::{Arc, RwLock};
|
||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct Child(Arc<RwLock<dyn ComponentTrait>>);
|
pub struct Child(Arc<RwLock<dyn ComponentTrait>>);
|
||||||
|
|
@ -17,10 +17,10 @@ impl Child {
|
||||||
pub fn id(&self) -> Option<String> {
|
pub fn id(&self) -> Option<String> {
|
||||||
self.0.read().unwrap().id()
|
self.0.read().unwrap().id()
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
pub fn writable(&self) -> RwLockWriteGuard<'_, dyn ComponentTrait> {
|
pub fn writable(&self) -> RwLockWriteGuard<'_, dyn ComponentTrait> {
|
||||||
self.0.write().unwrap()
|
self.0.write().unwrap()
|
||||||
}
|
} */
|
||||||
|
|
||||||
// Child RENDER.
|
// Child RENDER.
|
||||||
|
|
||||||
|
|
@ -59,10 +59,10 @@ impl<C: ComponentTrait> Typed<C> {
|
||||||
pub fn id(&self) -> Option<String> {
|
pub fn id(&self) -> Option<String> {
|
||||||
self.0.read().unwrap().id()
|
self.0.read().unwrap().id()
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
pub fn writable(&self) -> RwLockWriteGuard<'_, C> {
|
pub fn writable(&self) -> RwLockWriteGuard<'_, C> {
|
||||||
self.0.write().unwrap()
|
self.0.write().unwrap()
|
||||||
}
|
} */
|
||||||
|
|
||||||
// Typed RENDER.
|
// Typed RENDER.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue