Add cancel event (#4476)
* feat: add cancel event * feat: provide cancel event * feat: insert cancel event in web * fix: typo * feat: propagate implementation of cancel event * fix merge conflicts / tests --------- Co-authored-by: Jonathan Kelley <jkelleyrtp@gmail.com>
This commit is contained in:
1 parent
f95d8e4682
commit
8d617080b1
9 files changed
+165
-5
No files matched your search
@@ -5,11 +5,11 @@ use dioxus_html::{
|
||||
point_interaction::{
|
||||
InteractionElementOffset, InteractionLocation, ModifiersInteraction, PointerInteraction,
|
||||
},
|
||||
AnimationData, ClipboardData, CompositionData, DragData, FocusData, FormData, FormValue,
|
||||
HasFileData, HasFocusData, HasFormData, HasKeyboardData, HasMouseData, HtmlEventConverter,
|
||||
ImageData, KeyboardData, MediaData, MountedData, MouseData, PlatformEventData, PointerData,
|
||||
ResizeData, ScrollData, SelectionData, ToggleData, TouchData, TransitionData, VisibleData,
|
||||
WheelData,
|
||||
AnimationData, CancelData, ClipboardData, CompositionData, DragData, FocusData, FormData,
|
||||
FormValue, HasFileData, HasFocusData, HasFormData, HasKeyboardData, HasMouseData,
|
||||
HtmlEventConverter, ImageData, KeyboardData, MediaData, MountedData, MouseData,
|
||||
PlatformEventData, PointerData, ResizeData, ScrollData, SelectionData, ToggleData, TouchData,
|
||||
TransitionData, VisibleData, WheelData,
|
||||
};
|
||||
use keyboard_types::{Code, Key, Location, Modifiers};
|
||||
use std::any::Any;
|
||||
@@ -18,6 +18,10 @@ use std::collections::HashMap;
|
||||
pub struct NativeConverter {}
|
||||
|
||||
impl HtmlEventConverter for NativeConverter {
|
||||
fn convert_cancel_data(&self, _event: &PlatformEventData) -> CancelData {
|
||||
todo!("todo: convert_cancel_data in dioxus-native. requires support in blitz")
|
||||
}
|
||||
|
||||
fn convert_form_data(&self, event: &PlatformEventData) -> FormData {
|
||||
event.downcast::<NativeFormData>().unwrap().clone().into()
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user