2
0
Fork 0
mirror of https://github.com/DioxusLabs/dioxus synced 2024-12-18 08:33:07 +00:00
dioxus/docs/guide/examples/event_prevent_default.rs
Attilio c645e1c6aa
Allow multiple prevent default for Web, Desktop and LiveView ()
* 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>
2023-04-27 11:26:04 -05:00

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
}