View Source LiveAdmin (LiveAdmin v1.0.0-rc.3)
Link to this section Summary
Functions
Defines NimbleOptions schema for configuration that can be set at all levels (resource, scope, and application).
Link to this section Types
Link to this section Functions
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) - Overrides portions of the UI with custom LiveComponent modules.:ecto_repo(Ecto Repo used to query resource) - Required. Must be set at the application or scope level.:query_with(func_ref/0returning an Ecto queryable) - Customizes how records are fetched. Receives the resource and search term and should return an Ecto queryable. Useful for adding preloads or custom search logic. When not set, uses the schema with built-in search.:render_with(func_ref/0used to convert field values to strings when rendering) - Customizes how field values are displayed. Receives the record, field name, and session. Should return a string orPhoenix.HTML.Safevalue to render HTML. When not set, uses built-in type-based rendering.:delete_with(func_ref/0orfalse) - Customizes how records are deleted. Can be set tofalseto disable. When not set, usesRepo.delete.:create_with(func_ref/0orfalse) - Customizes how records are created. Can be set tofalseto disable. When not set, builds a changeset that casts all fields with no validations and callsRepo.insert.:update_with(func_ref/0orfalse) - Customizes how records are updated. Can be set tofalseto disable. When not set, builds a changeset that casts all fields with no validations and callsRepo.update.:validate_with(func_ref/0) - Customizes how changesets are validated in create/update forms. When not set, no additional validation is applied.:label_with(func_ref/0) - Customizes how records are identified in the UI. When not set, uses the primary key.:title_with(string literal orfunc_ref/0) - Customizes the heading displayed for a resource. When not set, uses the schema module name.:hidden_fields(field_list/0) - Specifies fields to hide from all views. When not set at the resource level, falls back to scope or global config (default:[]).:immutable_fields(field_list/0) - Specifies fields to disable in create/update forms. When not set at the resource level, falls back to scope or global config (default:[]).:actions(func_list/0taking a record, LiveAdmin session struct, and any extra args) - Defines functions that operate on a specific record. When not set at the resource level, falls back to scope or global config (default:[]).:tasks(func_list/0taking a query, LiveAdmin session, and any extra args) - Defines functions that operate on a resource as a whole. When not set at the resource level, falls back to scope or global config (default:[]).