public inbox for yew-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: yew-devel@lists.proxmox.com
Subject: [PATCH yew-widget-toolkit 4/5] widget: data table: header: fix keyboard navigation from group headers
Date: Fri, 16 Oct 2026 11:01:13 +0200	[thread overview]
Message-ID: <20261016090256.1170172-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20261016090256.1170172-1-d.csapak@proxmox.com>

Only column headers update the header cursor when they get the focus,
but group headers are focusable too. When a group header gets the
focus, the cursor is either not set yet, so the arrow keys do nothing,
or it still points to the previously focused cell, so the arrow keys
move from there instead.

Since the first header cell is the initial tab stop, this affects
every table where the first header is a group header.

To reproduce:
* use a data table where the first header is a group header
* focus the header with the tab key
* press the right arrow key

The focus stays on the group header instead of moving to the next
cell.

Fix this by also setting the cursor when a group header gets the
focus.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 src/widget/data_table/header_widget.rs | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/widget/data_table/header_widget.rs b/src/widget/data_table/header_widget.rs
index b6f06f6..2f55e88 100644
--- a/src/widget/data_table/header_widget.rs
+++ b/src/widget/data_table/header_widget.rs
@@ -425,6 +425,7 @@ impl<T: 'static> PwtHeaderWidget<T> {
                     format!("grid-column: {} / span {}", start_col + 1, span,),
                 )
                 .with_child(group.name.clone())
+                .onfocusin(link.callback(move |_| Msg::FocusCell(cell_idx)))
                 .into(),
         );
 
-- 
2.47.3





  parent reply	other threads:[~2026-10-16  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16  9:01 [PATCH yew-widget-toolkit 0/5] data table fixes Dominik Csapak
2026-10-16  9:01 ` [PATCH yew-widget-toolkit 1/5] widget: data table: keep hidden columns when headers are recreated Dominik Csapak
2026-10-16  9:01 ` [PATCH yew-widget-toolkit 2/5] widget: data table: update listeners when store or selection change Dominik Csapak
2026-10-16  9:01 ` [PATCH yew-widget-toolkit 3/5] widget: data table: update cell configuration on property change Dominik Csapak
2026-10-16  9:01 ` Dominik Csapak [this message]
2026-10-16  9:01 ` [PATCH yew-widget-toolkit 5/5] widget: data table: header: skip hidden cells in keyboard navigation Dominik Csapak
2026-10-16  9:44 ` applied: [PATCH yew-widget-toolkit 0/5] data table fixes Dietmar Maurer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261016090256.1170172-5-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=yew-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal