Fix some warnings: avoid deprecated fields
This commit is contained in:
1 parent
6aa800018b
commit
cae0c1409d
4 files changed
+7
-5
No files matched your search
@@ -1,5 +1,4 @@
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_core::UiEvent;
|
||||
use dioxus_html::on::{FocusData, KeyboardData, MouseData, WheelData};
|
||||
use std::sync::Arc;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
use dioxus::{events::KeyCode, prelude::*};
|
||||
use dioxus::prelude::*;
|
||||
use dioxus_html::input_data::keyboard_types::Code;
|
||||
|
||||
fn main() {
|
||||
dioxus::tui::launch(app);
|
||||
@@ -27,7 +28,7 @@ fn Button(cx: Scope<ButtonProps>) -> Element {
|
||||
background_color: "{color}",
|
||||
tabindex: "{cx.props.layer}",
|
||||
onkeydown: |e| {
|
||||
if let KeyCode::Space = e.data.key_code{
|
||||
if let Code::Space = e.data.code() {
|
||||
toggle.modify(|f| !f);
|
||||
}
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user