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

View Source

Pagination 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

calculate_total_pages(state)

@spec calculate_total_pages(Raxol.UI.Components.Input.SelectList.t()) ::
  non_neg_integer()

Calculates the total number of pages.

get_current_page(state)

Gets the current page number.

get_effective_options(state)

@spec get_effective_options(Raxol.UI.Components.Input.SelectList.t()) :: list()

Gets the effective options based on current filter/search state.

get_page_options(state)

@spec get_page_options(Raxol.UI.Components.Input.SelectList.t()) :: list()

Gets the options for the current page.

has_next_page?(state)

@spec has_next_page?(Raxol.UI.Components.Input.SelectList.t()) :: boolean()

Checks if there's a next page.

has_prev_page?(state)

@spec has_prev_page?(Raxol.UI.Components.Input.SelectList.t()) :: boolean()

Checks if there's a previous page.

next_page(state)

Moves to the next page.

prev_page(state)

Moves to the previous page.

update_page_state(state, page_num)

Updates the page state based on page number.