Make EventHandler copy (#2112)
* implement Copy for EventHandler * implement from closure for event handler and remove special on prefix * fix props implementation of EventHandler
This commit is contained in:
1 parent
4bb807a3ce
commit
58f7efafea
19 files changed
+755
-364
No files matched your search
@@ -268,13 +268,13 @@ pub fn Link(props: LinkProps) -> Element {
|
||||
router.push_any(router.resolve_into_routable(to.clone()));
|
||||
}
|
||||
|
||||
if let Some(handler) = onclick.clone() {
|
||||
if let Some(handler) = onclick {
|
||||
handler.call(event);
|
||||
}
|
||||
};
|
||||
|
||||
let onmounted = move |event| {
|
||||
if let Some(handler) = props.onmounted.clone() {
|
||||
if let Some(handler) = props.onmounted {
|
||||
handler.call(event);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user