View Source Exzeitable.Params (Exzeitable v0.6.0)

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

Validates that parameters are valid.

Link to this section Summary

Functions

Creates a new params struct, holds state for liveview

Gets fields from options and merges it into the defaults

Link to this section Types

@type column() :: atom()
@type function_name() :: atom()
@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()},
  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(),
  refresh: boolean(),
  repo: module(),
  routes: module(),
  search: String.t(),
  show_field_buttons: boolean(),
  text: module()
}

Link to this section Functions

Link to this function

new(function_opts, module_opts, module)

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

Creates a new params struct, holds state for liveview

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

Gets fields from options and merges it into the defaults