fix dioxus-tui events
This commit is contained in:
1 parent
0ab7a02777
commit
d06e64e5ad
19 files changed
+221
-21
No files matched your search
@@ -25,12 +25,14 @@ impl PartialEq for ClipboardData {
|
||||
}
|
||||
|
||||
impl ClipboardData {
|
||||
/// Create a new ClipboardData
|
||||
pub fn new(inner: impl HasClipboardData) -> Self {
|
||||
Self {
|
||||
inner: Box::new(inner),
|
||||
}
|
||||
}
|
||||
|
||||
/// Downcast this event to a concrete event type
|
||||
pub fn downcast<T: 'static>(&self) -> Option<&T> {
|
||||
self.inner.as_ref().as_any().downcast_ref::<T>()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user