Skip to content

Respect checkbox navigation boundaries after skipping unavailable items - #529

Open
HocVoNgThai wants to merge 1 commit into
tmbo:masterfrom
HocVoNgThai:fix/checkbox-navigation-boundaries
Open

HocVoNgThai wants to merge 1 commit into
tmbo:masterfrom
HocVoNgThai:fix/checkbox-navigation-boundaries

Conversation

@HocVoNgThai

Copy link
Copy Markdown

What is the problem that this PR addresses?

On master, checkbox(cycle_list=False) still wraps past disabled choices, separators and the boundaries of filtered results. For example, with ['first', 'last', Separator()], pressing Down twice, Space and Enter returns ['first'] instead of ['last'].

How did you solve it?

Check for wrapping after skipping unavailable choices, using the cursor's previous and resulting positions. The example now stays on last; filtered results also stop at their visible boundaries. Adds four compact regression cases for both directions and unselectable edge types.

Checklist

  • I have read the Contributor's Guide.
  • I will check that all automated PR checks pass before the PR gets reviewed.

Closes #528

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Checkbox still wraps with cycle_list=False around unselectable or filtered items

1 participant