Fix moutned data on desktop

This commit is contained in:
Jonathan Kelley 2024-01-08 13:03:47 -08:00
parent 1b883b2858
commit c90f31a4f6
No known key found for this signature in database
GPG key ID: 1FBB50F7EB0A08BE

View file

@ -12,8 +12,7 @@ use crate::{
use crossbeam_channel::Receiver;
use dioxus_core::{Component, ElementId, VirtualDom};
use dioxus_html::{
native_bind::NativeFileEngine, FileEngine, HasFormData, HtmlEvent, MountedData,
PlatformEventData,
native_bind::NativeFileEngine, FileEngine, HasFormData, HtmlEvent, PlatformEventData,
};
use std::{
cell::{Cell, RefCell},
@ -248,7 +247,7 @@ impl<P: 'static> App<P> {
let as_any = match data {
dioxus_html::EventData::Mounted => {
let element = DesktopElement::new(element, view.desktop_context.clone(), query);
Rc::new(PlatformEventData::new(Box::new(MountedData::new(element))))
Rc::new(PlatformEventData::new(Box::new(element)))
}
_ => data.into_any(),
};