Raxol.UI.Components.Input.SelectList.Navigation (Raxol v0.3.0)

View Source

Handles keyboard navigation functionality for the SelectList component.

Summary

Functions

Handles arrow down key press, moving focus down one item.

Handles arrow up key press, moving focus up one item.

Handles end key press, moving focus to the last item.

Handles home key press, moving focus to the first item.

Handles page down key press, moving focus down one page.

Handles page up key press, moving focus up one page.

Updates focus index and scroll position to ensure the focused item is visible.

Functions

handle_arrow_down(state)

Handles arrow down key press, moving focus down one item.

handle_arrow_up(state)

Handles arrow up key press, moving focus up one item.

handle_end(state)

Handles end key press, moving focus to the last item.

handle_home(state)

Handles home key press, moving focus to the first item.

handle_page_down(state)

Handles page down key press, moving focus down one page.

handle_page_up(state)

Handles page up key press, moving focus up one page.

update_focus_and_scroll(state, new_index)

Updates focus index and scroll position to ensure the focused item is visible.