Feat: major overhaul to diffing
This commit is contained in:
1 parent
c809095124
commit
9810feebf5
37 files changed
+1470
-1129
No files matched your search
@@ -542,8 +542,14 @@ fn virtual_event_from_websys_event(event: &web_sys::Event) -> VirtualEvent {
|
||||
|
||||
"change" | "input" | "invalid" | "reset" | "submit" => {
|
||||
// is a special react events
|
||||
// let evt: web_sys::FormEvent = event.clone().dyn_into().unwrap();
|
||||
todo!()
|
||||
let evt: web_sys::InputEvent = event.clone().dyn_into().expect("wrong event type");
|
||||
let value: Option<String> = (&evt).data();
|
||||
let value = value.unwrap_or_default();
|
||||
// let value = (&evt).data().expect("No data to unwrap");
|
||||
|
||||
// todo - this needs to be a "controlled" event
|
||||
// these events won't carry the right data with them
|
||||
VirtualEvent::FormEvent(FormEvent { value })
|
||||
}
|
||||
|
||||
"click" | "contextmenu" | "doubleclick" | "drag" | "dragend" | "dragenter" | "dragexit"
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
use dioxus::prelude::Properties;
|
||||
use fxhash::FxHashMap;
|
||||
use web_sys::{window, Document, Element, Event, Node};
|
||||
// use futures::{channel::mpsc, SinkExt, StreamExt};
|
||||
|
||||
use dioxus::virtual_dom::VirtualDom;
|
||||
pub use dioxus_core as dioxus;
|
||||
use dioxus_core::{events::EventTrigger, prelude::FC};
|
||||
// use futures::{channel::mpsc, SinkExt, StreamExt};
|
||||
|
||||
pub use dioxus_core::prelude;
|
||||
pub mod interpreter;
|
||||
|
||||
Reference in new issue
Block a user