mirror of
https://github.com/leptos-rs/leptos.git
synced 2025-12-27 11:04:40 -05:00
fix: allow setting NodeRef by implementing IsDisposed (#4367)
This commit is contained in:
@@ -7,8 +7,8 @@ use reactive_graph::{
|
||||
RwSignal,
|
||||
},
|
||||
traits::{
|
||||
DefinedAt, Get, Notify, ReadUntracked, Set, Track, UntrackableGuard,
|
||||
Write,
|
||||
DefinedAt, Get, IsDisposed, Notify, ReadUntracked, Set, Track,
|
||||
UntrackableGuard, Write,
|
||||
},
|
||||
};
|
||||
use send_wrapper::SendWrapper;
|
||||
@@ -158,6 +158,16 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
impl<E> IsDisposed for NodeRef<E>
|
||||
where
|
||||
E: ElementType,
|
||||
E::Output: 'static,
|
||||
{
|
||||
fn is_disposed(&self) -> bool {
|
||||
self.0.is_disposed()
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a [NodeRef].
|
||||
#[inline(always)]
|
||||
#[track_caller]
|
||||
|
||||
Reference in New Issue
Block a user