Create closure type; allow async event handlers in props; allow short hand event handlers (#2437)
* create closure type; allow async event handlers in props; allow shorthand event handlers * test forwarding event handlers with the shorthand syntax * fix clippy * fix imports in spawn async doctest
This commit is contained in:
1 parent
79e18c2d62
commit
d795995e20
11 files changed
+294
-103
No files matched your search
@@ -25,7 +25,7 @@ fn app() -> Element {
|
||||
div { class: "flex items-start justify-center flex-row",
|
||||
SearchBox { country }
|
||||
div { class: "flex flex-wrap w-full px-2",
|
||||
div { class: "bg-gray-900 text-white relative min-w-0 break-words rounded-lg overflow-hidden shadow-sm mb-4 w-full bg-white dark:bg-gray-600",
|
||||
div { class: "bg-gray-900 text-white relative min-w-0 break-words rounded-lg overflow-hidden shadow-sm mb-4 w-full dark:bg-gray-600",
|
||||
div { class: "px-6 py-6 relative",
|
||||
if let Some(Ok(weather)) = current_weather.read().as_ref() {
|
||||
CountryData {
|
||||
@@ -122,7 +122,7 @@ fn SearchBox(mut country: Signal<WeatherLocation>) -> Element {
|
||||
placeholder: "Country name",
|
||||
"type": "text",
|
||||
autofocus: true,
|
||||
oninput: move |e| input.set(e.value())
|
||||
oninput: move |e: FormEvent| input.set(e.value())
|
||||
}
|
||||
svg {
|
||||
class: "w-4 h-4 absolute left-2.5 top-3.5",
|
||||
|
||||
Reference in new issue
Block a user