Raxol.UI.Components.Input.SelectList.Utils (Raxol v2.0.1)

View Source

Shared utility functions for SelectList component modules. Eliminates code duplication between Navigation and Selection modules.

Summary

Functions

Ensures that the selected item is visible within the scroll viewport. Adjusts scroll_offset to bring the selected item into view.

Functions

ensure_visible(state)

Ensures that the selected item is visible within the scroll viewport. Adjusts scroll_offset to bring the selected item into view.

Parameters

  • state: The SelectList state

Returns

Updated state with adjusted scroll_offset if necessary