Răsfoiți Sursa

fix: Fix stop_propagation example (#1143)

Marc Espín 2 ani în urmă
părinte
comite
cb73343865
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      packages/core/src/events.rs

+ 1 - 1
packages/core/src/events.rs

@@ -53,7 +53,7 @@ impl<T> Event<T> {
     /// rsx! {
     /// rsx! {
     ///     button {
     ///     button {
     ///         onclick: move |evt: Event<MouseData>| {
     ///         onclick: move |evt: Event<MouseData>| {
-    ///             evt.cancel_bubble();
+    ///             evt.stop_propagation();
     ///         }
     ///         }
     ///     }
     ///     }
     /// }
     /// }