View Source Exzeitable.Params (Exzeitable v0.6.8)

Gets default parameters, replaces with module opts and then with the function opts.

Validates that parameters are valid.

Summary

Functions

Creates a new params struct, holds state for liveview

Gets fields from options and merges it into the defaults

Types

column()

@type column() :: atom()

function_name()

@type function_name() :: atom()

t()

@type t() :: %Exzeitable.Params{
  action_buttons: [:new | :show | :edit | :delete],
  assigns: map(),
  belongs_to: atom() | nil,
  count: non_neg_integer(),
  csrf_token: String.t(),
  debounce: pos_integer(),
  disable_hide: boolean(),
  fields: [{column(), keyword()}],
  formatter: {module(), function_name()} | {module(), function_name(), list()},
  html_classes: Keyword.t(String.t()) | nil,
  list: [struct()],
  module: module(),
  order: [{:asc | :desc, column()}] | nil,
  page: pos_integer(),
  pagination: [:top | :bottom],
  parent: struct() | nil,
  path: atom(),
  per_page: pos_integer(),
  query: Ecto.Query.t(),
  query_modifier: term(),
  refresh: boolean(),
  repo: module(),
  routes: module(),
  search: String.t(),
  show_field_buttons: boolean(),
  text: module()
}

Functions

new(function_opts, module_opts, module)

@spec new(keyword(), keyword(), atom()) :: map()

Creates a new params struct, holds state for liveview

set_fields(opts)

@spec set_fields(keyword()) :: [any()]

Gets fields from options and merges it into the defaults