View Source LiveAdmin (LiveAdmin v0.12.1)

Link to this section Summary

Link to this section Types

Specs

field_list() :: [:atom]

Specs

func_list() :: [func_ref()] | keyword(func_ref())

Specs

func_ref() :: :atom | mod_func() | :mfa

Specs

mod_func() :: {module(), :atom}

Link to this section Functions

Link to this function

associated_resource(schema, field_name, resources, part \\ nil)

View Source

Defines NimbleOptions schema for configuration that can be set at all levels (resource, scope, and application).

Used internally to validate configuration in apps using LiveAdmin.

Supported options:

  • :components (list of modules implementing LiveComponent overrides of LiveAdmin views)

  • :ecto_repo (Ecto Repo used to query resource)

  • :list_with (func_ref/0 returning {records, count} used to fetch records in LiveAdmin :list component)

  • :render_with (func_ref/0 used to convert field values to string in LiveAdmin :list component)

  • :delete_with (func_ref/0 or false to disable deleting records)

  • :create_with (func_ref/0 or false to disable creating records)

  • :update_with (func_ref/0 or false to disable updating records)

  • :validate_with (func_ref/0 used to validate create/update changesets in LiveAdmin :form component)

  • :label_with (func_ref/0 used to convert (association) record to string in LiveAdmin SearchSelect component)

  • :title_with (string literal or MFA returning a string used to render LiveAdmin UI heading)

  • :hidden_fields (field_list/0 to be hidden from LiveView)

  • :immutable_fields (field_list/0 to be disabled in LiveAdmin :form component)

  • :actions (func_list/0 taking a record, LiveAdmin session struct, and any extra args)

  • :tasks (func_list/0 taking a LiveAdmin session and any extra args)

Link to this function

extract_function_docs(module, function)

View Source
Link to this function

fetch_config(resource, key, config)

View Source
Link to this function

fetch_function(resource, session, function_type, function)

View Source
Link to this function

parent_associations(schema)

View Source
Link to this function

record_label(record, resource, config)

View Source
Link to this function

resource_title(resource, session)

View Source
Link to this function

resources(router, base_path)

View Source
Link to this function

route_with_params(assigns, parts \\ [])

View Source
Link to this function

trans(string, opts \\ [])

View Source