Raxol.UI.Components.Input.SelectList.Utils (Raxol v2.0.1)
View SourceShared 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
@spec ensure_visible(Raxol.UI.Components.Input.SelectList.t()) :: Raxol.UI.Components.Input.SelectList.t()
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