mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-12-19 09:03:13 +00:00
c645e1c6aa
* Allow multiple prevent default in dioxus_web * Use SplitWhitespace for prevent default requests * Add multiple prevent default option to liveview and desktop * Update docs about prevent_default attribute * cargo clippy * update prevent default guide example --------- Co-authored-by: Evan Almloff <ealmlof1@stumail.jccc.edu>
17 lines
297 B
Rust
17 lines
297 B
Rust
#![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
|
|
}
|