Skip to content
Open
13 changes: 0 additions & 13 deletions packages/html/src/events/animation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,3 @@ pub trait HasAnimationData: std::any::Any {
/// return self as Any
fn as_any(&self) -> &dyn std::any::Any;
}

impl_event! [
AnimationData;

/// onanimationstart
onanimationstart

/// onanimationend
onanimationend

/// onanimationiteration
onanimationiteration
];
7 changes: 0 additions & 7 deletions packages/html/src/events/cancel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,3 @@ pub trait HasCancelData: std::any::Any {
/// return self as Any
fn as_any(&self) -> &dyn std::any::Any;
}

impl_event! {
CancelData;

/// oncancel
oncancel
}
13 changes: 0 additions & 13 deletions packages/html/src/events/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,3 @@ pub trait HasClipboardData: std::any::Any {
/// return self as Any
fn as_any(&self) -> &dyn std::any::Any;
}

impl_event![
ClipboardData;

/// oncopy
oncopy

/// oncut
oncut

/// onpaste
onpaste
];
13 changes: 0 additions & 13 deletions packages/html/src/events/composition.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,16 +94,3 @@ pub trait HasCompositionData: std::any::Any {
/// return self as Any
fn as_any(&self) -> &dyn std::any::Any;
}

impl_event! [
CompositionData;

/// oncompositionstart
oncompositionstart

/// oncompositionend
oncompositionend

/// oncompositionupdate
oncompositionupdate
];
28 changes: 0 additions & 28 deletions packages/html/src/events/drag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,31 +226,3 @@ pub trait HasDragData: HasMouseData + crate::HasFileData + crate::HasDataTransfe
/// return self as Any
fn as_any(&self) -> &dyn std::any::Any;
}

impl_event! {
DragData;

/// ondrag
ondrag

/// ondragend
ondragend

/// ondragenter
ondragenter

/// ondragexit
ondragexit

/// ondragleave
ondragleave

/// ondragover
ondragover

/// ondragstart
ondragstart

/// ondrop
ondrop
}
16 changes: 0 additions & 16 deletions packages/html/src/events/focus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,3 @@ pub trait HasFocusData: std::any::Any {
/// return self as Any
fn as_any(&self) -> &dyn std::any::Any;
}

impl_event! [
FocusData;

/// onfocus
onfocus

// onfocusout
onfocusout

// onfocusin
onfocusin

/// onblur
onblur
];
62 changes: 0 additions & 62 deletions packages/html/src/events/form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,65 +346,3 @@ mod serialize {
}
}
}

impl_event! {
FormData;

/// onchange
onchange

/// The `oninput` event is fired when the value of a `<input>`, `<select>`, or `<textarea>` element is changed.
///
/// There are two main approaches to updating your input element:
/// 1) Controlled inputs directly update the value of the input element as the user interacts with the element
///
/// ```rust
/// use dioxus::prelude::*;
///
/// fn App() -> Element {
/// let mut value = use_signal(|| "hello world".to_string());
///
/// rsx! {
/// input {
/// // We directly set the value of the input element to our value signal
/// value: "{value}",
/// // The `oninput` event handler will run every time the user changes the value of the input element
/// // We can set the `value` signal to the new value of the input element
/// oninput: move |event| value.set(event.value())
/// }
/// // Since this is a controlled input, we can also update the value of the input element directly
/// button {
/// onclick: move |_| value.write().clear(),
/// "Clear"
/// }
/// }
/// }
/// ```
///
/// 2) Uncontrolled inputs just read the value of the input element as it changes
///
/// ```rust
/// use dioxus::prelude::*;
///
/// fn App() -> Element {
/// rsx! {
/// input {
/// // In uncontrolled inputs, we don't set the value of the input element directly
/// // But you can still read the value of the input element
/// oninput: move |event| println!("{}", event.value()),
/// }
/// // Since we don't directly control the value of the input element, we can't easily modify it
/// }
/// }
/// ```
oninput

/// oninvalid
oninvalid

/// onreset
onreset

/// onsubmit
onsubmit
}
Loading
Loading