Raxol.UI.Components.Input.SelectList.Pagination (Raxol v2.0.1)
View SourcePagination helper for SelectList component. Handles page-based navigation and state management.
Summary
Functions
Calculates the total number of pages.
Gets the current page number.
Gets the effective options based on current filter/search state.
Gets the options for the current page.
Checks if there's a next page.
Checks if there's a previous page.
Moves to the next page.
Moves to the previous page.
Updates the page state based on page number.
Functions
@spec calculate_total_pages(Raxol.UI.Components.Input.SelectList.t()) :: non_neg_integer()
Calculates the total number of pages.
@spec get_current_page(Raxol.UI.Components.Input.SelectList.t()) :: non_neg_integer()
Gets the current page number.
@spec get_effective_options(Raxol.UI.Components.Input.SelectList.t()) :: list()
Gets the effective options based on current filter/search state.
@spec get_page_options(Raxol.UI.Components.Input.SelectList.t()) :: list()
Gets the options for the current page.
@spec has_next_page?(Raxol.UI.Components.Input.SelectList.t()) :: boolean()
Checks if there's a next page.
@spec has_prev_page?(Raxol.UI.Components.Input.SelectList.t()) :: boolean()
Checks if there's a previous page.
@spec next_page(Raxol.UI.Components.Input.SelectList.t()) :: Raxol.UI.Components.Input.SelectList.t()
Moves to the next page.
@spec prev_page(Raxol.UI.Components.Input.SelectList.t()) :: Raxol.UI.Components.Input.SelectList.t()
Moves to the previous page.
@spec update_page_state(Raxol.UI.Components.Input.SelectList.t(), non_neg_integer()) :: Raxol.UI.Components.Input.SelectList.t()
Updates the page state based on page number.