dioxus/docs/guide/examples/event_prevent_default.rs

18 lines
297 B
Rust
Raw Normal View History

#![allow(non_snake_case)]
use dioxus::prelude::*;
fn main() {
dioxus_desktop::launch(App);
}
#[rustfmt::skip]
fn App(cx: Scope) -> Element {
// ANCHOR: prevent_default
cx.render(rsx! {
input {
prevent_default: "oninput onclick",
}
})
// ANCHOR_END: prevent_default
}