Raxol.UI.Components.Input.SelectList.Pagination (Raxol v0.4.0)

View Source

Handles pagination functionality for the SelectList component.

Summary

Functions

Calculates the total number of pages based on the number of options and page size.

Gets the effective options list (filtered or original) based on current state.

Gets the options for a specific page.

Updates pagination state based on a new page number.

Types

option()

@type option() :: {String.t(), any()}

options()

@type options() :: [option()]

Functions

calculate_total_pages(num_options, page_size)

Calculates the total number of pages based on the number of options and page size.

get_effective_options(state)

Gets the effective options list (filtered or original) based on current state.

get_page_options(options, page_num, page_size)

Gets the options for a specific page.

update_page_state(state, page_num)

Updates pagination state based on a new page number.