all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH datacenter-manager] ui: auto-installer: filter keyboard layouts based on code and human name
@ 2026-05-26 14:20 Shannon Sterz
  2026-05-26 14:28 ` applied: " Lukas Wagner
  0 siblings, 1 reply; 3+ messages in thread
From: Shannon Sterz @ 2026-05-26 14:20 UTC (permalink / raw)
  To: pdm-devel

should improve usability of this filter field by also allowing to
search for the values that are actually rendered.

Signed-off-by: Shannon Sterz <s.sterz@proxmox.com>
---
 .../auto_installer/prepared_answer_form.rs     | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/ui/src/remotes/auto_installer/prepared_answer_form.rs b/ui/src/remotes/auto_installer/prepared_answer_form.rs
index 67b78fe..100b802 100644
--- a/ui/src/remotes/auto_installer/prepared_answer_form.rs
+++ b/ui/src/remotes/auto_installer/prepared_answer_form.rs
@@ -224,6 +224,24 @@ pub fn render_global_options_form(
                         .into()
                 })
                 .value(serde_variant_name(config.keyboard))
+                .filter(|item: &AttrValue, query: &str| {
+                    let query = query.to_string().to_lowercase();
+                    let item = item.to_string();
+
+                    // match by keyboard layout code
+                    if item.starts_with(&query) {
+                        return true;
+                    }
+
+                    // match by keyboard layout human name
+                    if let Ok(human_name) = item.parse::<KeyboardLayout>()
+                        .map(|v| v.human_name().to_owned()) {
+                        log::info!("{:?}", human_name);
+                        return human_name.to_lowercase().contains(&query);
+                    }
+
+                    false
+                })
                 .autoselect_filter(true)
                 .required(true),
         )
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* applied: [PATCH datacenter-manager] ui: auto-installer: filter keyboard layouts based on code and human name
  2026-05-26 14:20 [PATCH datacenter-manager] ui: auto-installer: filter keyboard layouts based on code and human name Shannon Sterz
@ 2026-05-26 14:28 ` Lukas Wagner
  2026-05-26 14:30   ` Shannon Sterz
  0 siblings, 1 reply; 3+ messages in thread
From: Lukas Wagner @ 2026-05-26 14:28 UTC (permalink / raw)
  To: pdm-devel, Shannon Sterz


On Tue, 26 May 2026 16:20:43 +0200, Shannon Sterz wrote:
> should improve usability of this filter field by also allowing to
> search for the values that are actually rendered.
> 
> 

Applied, thanks!

removed the left-over log::info statement when applying

[1/1] ui: auto-installer: filter keyboard layouts based on code and human name
      commit: d73016bcf7a27c96b9def45406592f8dbb01f094

Best regards,
-- 
Lukas Wagner <l.wagner@proxmox.com>




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: applied: [PATCH datacenter-manager] ui: auto-installer: filter keyboard layouts based on code and human name
  2026-05-26 14:28 ` applied: " Lukas Wagner
@ 2026-05-26 14:30   ` Shannon Sterz
  0 siblings, 0 replies; 3+ messages in thread
From: Shannon Sterz @ 2026-05-26 14:30 UTC (permalink / raw)
  To: Lukas Wagner, pdm-devel

On Tue May 26, 2026 at 4:28 PM CEST, Lukas Wagner wrote:
>
> On Tue, 26 May 2026 16:20:43 +0200, Shannon Sterz wrote:
>> should improve usability of this filter field by also allowing to
>> search for the values that are actually rendered.
>>
>>
>
> Applied, thanks!
>
> removed the left-over log::info statement when applying

sorry, thanks for that!

> [1/1] ui: auto-installer: filter keyboard layouts based on code and human name
>       commit: d73016bcf7a27c96b9def45406592f8dbb01f094
>
> Best regards,





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-26 14:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-26 14:20 [PATCH datacenter-manager] ui: auto-installer: filter keyboard layouts based on code and human name Shannon Sterz
2026-05-26 14:28 ` applied: " Lukas Wagner
2026-05-26 14:30   ` Shannon Sterz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal