mirror of
https://github.com/imgurbot12/rmenu.git
synced 2025-01-27 05:18:33 +01:00
feat: upgrade to dioxus 0.4.0
This commit is contained in:
parent
621c1bd4d8
commit
f00ad7ca49
3 changed files with 7 additions and 7 deletions
|
@ -9,8 +9,8 @@ edition = "2021"
|
|||
bincode = "1.3.3"
|
||||
cached = "0.44.0"
|
||||
clap = { version = "4.3.15", features = ["derive"] }
|
||||
dioxus = "0.3.2"
|
||||
dioxus-desktop = "0.3.0"
|
||||
dioxus = "0.4.0"
|
||||
dioxus-desktop = "0.4.0"
|
||||
env_logger = "0.10.0"
|
||||
heck = "0.4.1"
|
||||
keyboard-types = "0.6.2"
|
||||
|
|
|
@ -151,9 +151,9 @@ fn TableEntry<'a>(cx: Scope<'a, GEntry<'a>>) -> Element<'a> {
|
|||
|
||||
#[inline]
|
||||
fn focus<T>(cx: Scope<T>) {
|
||||
let eval = dioxus_desktop::use_eval(cx);
|
||||
let eval = use_eval(cx);
|
||||
let js = "document.getElementById(`search`).focus()";
|
||||
eval(js.to_owned());
|
||||
let _ = eval(js);
|
||||
}
|
||||
|
||||
/// check if the current inputs match any of the given keybindings
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use dioxus::prelude::{use_ref, Scope, UseRef};
|
||||
use dioxus::prelude::{use_eval, use_ref, Scope, UseRef};
|
||||
use rmenu_plugin::Entry;
|
||||
|
||||
use crate::config::Config;
|
||||
|
@ -8,9 +8,9 @@ use crate::App;
|
|||
|
||||
#[inline]
|
||||
fn scroll<T>(cx: Scope<T>, pos: usize) {
|
||||
let eval = dioxus_desktop::use_eval(cx);
|
||||
let eval = use_eval(cx);
|
||||
let js = format!("document.getElementById(`result-{pos}`).scrollIntoView(false)");
|
||||
eval(js);
|
||||
let _ = eval(&js);
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Clone)]
|
||||
|
|
Loading…
Reference in a new issue