Add Missing Fields From Scroll Event (#4022)
* Add onscroll field data * Add bun 1.2.10 generated file changes * Improve error messaging when bun is not installed
This commit is contained in:
1 parent
d00636ca31
commit
c9ca9f32ad
14 files changed
+281
-37
No files matched your search
@@ -25,6 +25,8 @@ fn app() -> Element {
|
||||
events.write().push_back(event);
|
||||
};
|
||||
|
||||
let random_text = "This is some random repeating text. ".repeat(1000);
|
||||
|
||||
rsx! {
|
||||
document::Link { rel: "stylesheet", href: STYLE }
|
||||
div { id: "container",
|
||||
@@ -47,6 +49,18 @@ fn app() -> Element {
|
||||
|
||||
"Hover, click, type or scroll to see the info down below"
|
||||
}
|
||||
div {
|
||||
style: "padding: 50px;",
|
||||
div {
|
||||
style: "text-align: center; padding: 20px; font-family: sans-serif; overflow: auto; height: 400px;",
|
||||
onscroll: move |event: Event<ScrollData>| {
|
||||
log_event(event.data());
|
||||
},
|
||||
div { style: "margin: 20px; padding: 15px; border: 1px solid #ccc; border-radius: 5px;",
|
||||
p { "{random_text}" }
|
||||
}
|
||||
}
|
||||
}
|
||||
div { id: "log",
|
||||
for event in events.read().iter() {
|
||||
div { "{event:?}" }
|
||||
|
||||
Reference in new issue
Block a user