]> git.proxmox.com Git - ui/proxmox-yew-widget-toolkit.git/commitdiff
Selector: delete item with "Delete" and "Backspace"
authorDietmar Maurer <dietmar@proxmox.com>
Sat, 14 Oct 2023 07:13:24 +0000 (09:13 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Sat, 14 Oct 2023 07:13:24 +0000 (09:13 +0200)
src/widget/form/selector.rs

index d75ff48150ce02199cd80527610880106047645a..ef8ac74a9dac35aa5c3fdc69cd15f62910d9d332 100644 (file)
@@ -394,7 +394,7 @@ impl<S: DataStore + 'static> ManagedField for SelectorField<S> {
         let onkeydown = Callback::from({
             let link = ctx.link().clone();
             move |event: KeyboardEvent| match event.key().as_str() {
-                "Delete" => link.send_message(Msg::DeleteKey),
+                "Delete" | "Backspace" => link.send_message(Msg::DeleteKey),
                 _ => {}
             }
         });