AshAdmin.Components.Resource.RelationshipField (ash_admin v0.13.0)

View Source

This module defines a LiveComponent for rendering a relationship field in an AshAdmin resource form. It handles the logic for displaying a select dropdown or a typeahead input field, fetching and displaying suggestions, and updating the selected value.

Summary

Functions

form_control_label(resource)

handle_event(binary, arg2, socket)

Callback implementation for Phoenix.LiveComponent.handle_event/3.

mount(socket)

Callback implementation for Phoenix.LiveComponent.mount/1.

render(assigns)

@spec render(
  atom()
  | %{:resource => atom() | Ash.Query.t(), optional(any()) => any()}
) ::
  Phoenix.LiveView.Rendered.t()

Callback implementation for Phoenix.LiveComponent.render/1.

update(assigns, socket)

Callback implementation for Phoenix.LiveComponent.update/2.