View Source TestWeb.UserTable behaviour (Exzeitable v0.6.8)

User table

Summary

Functions

Convenience helper so LiveView doesn't have to be called directly

Typing into the search box... searches. Crazy, right?

Refresh periodically grabs new records from the database

Initial setup on page load

Callback implementation for Phoenix.LiveView.render/1.

Types

socket()

@type socket() :: Phoenix.LiveView.Socket.t()

Callbacks

render(map)

@callback render(map()) :: {:ok, iolist()}

Functions

build_table(assigns)

Convenience helper so LiveView doesn't have to be called directly

Example

<%= YourAppWeb.Live.Site.live_table(@conn, query: @query) %>

do_search(query, search)

@spec do_search(Ecto.Query.t(), String.t()) :: Ecto.Query.t()

handle_event(binary, arg2, socket)

@spec handle_event(String.t(), map(), socket()) :: {:noreply, socket()}

Typing into the search box... searches. Crazy, right?

handle_info(atom, socket)

Refresh periodically grabs new records from the database

live_table(conn, opts \\ [])

@spec live_table(
  Plug.Conn.t(),
  keyword()
) :: {:safe, iolist()}

mount(arg1, assigns, socket)

@spec mount(:not_mounted_at_router | map(), map(), socket()) :: {:ok, socket()}

Initial setup on page load

name_backwards(socket, entry)

render(assigns)

Callback implementation for Phoenix.LiveView.render/1.