DataProvider.Pagination.Params (DataProvider v1.2.1) View Source

Params module for DataProvider.Pagination

Fields

Link to this section Summary

Types

t()

Struct of params for DataProvider.Pagination.

Link to this section Types

Specs

t() :: %DataProvider.Pagination.Params{
  load_closing_separator?: boolean(),
  load_first_page?: boolean(),
  load_last_page?: boolean(),
  load_opening_separator?: boolean(),
  page_size: integer(),
  pages_ahead: integer(),
  pages_behind: integer()
}

Struct of params for DataProvider.Pagination.

Fields

  • page_size - Integer, by default is 15

  • pages_ahead - Integer, by default is 3

  • pages_behind - Integer, by default is 3

  • load_first_page? - Boolean, by default is true

  • load_last_page - Boolean, by default is true

  • load_opening_separator - Boolean, by default is true

  • load_closing_separator - Boolean, by default is true

Link to this section Functions

Specs

create(map()) :: t()

Creates new DataProvider.Paginations.Params struct by received map

Arguments

  1. Map with creation params

Returns

%DataProvider.Paginations.Params{
  page_size: 15,
  pages_ahead: 3,
  pages_behind: 3,
  load_first_page?: true,
  load_last_page?: true,
  load_opening_separator?: true,
  load_closing_separator?: true
}

Specs

page_size(t()) :: integer()

Returns page_size value, if it's integer

Arguments

  1. DataProvider.Paginations.Params struct
Link to this function

put_load_closing_separator?(schema, q)

View Source

Specs

put_load_closing_separator?(t(), boolean()) :: t()
Link to this function

put_load_first_page?(schema, q)

View Source

Specs

put_load_first_page?(t(), boolean()) :: t()
Link to this function

put_load_last_page?(schema, q)

View Source

Specs

put_load_last_page?(t(), boolean()) :: t()
Link to this function

put_load_opening_separator?(schema, q)

View Source

Specs

put_load_opening_separator?(t(), boolean()) :: t()
Link to this function

put_pages_ahead(schema, q)

View Source

Specs

put_pages_ahead(t(), integer()) :: t()
Link to this function

put_pages_behind(schema, q)

View Source

Specs

put_pages_behind(t(), integer()) :: t()