Exzeitable v0.3.1 Exzeitable.ActionButton View Source

For the actions buttons such as :new, :edit etc, as well as custom buttons.

Custom buttons can be added to the list in :action_buttons

Example

  action_buttons: [:new, :edit, :super_cool_custom_action]

You can then define the function called for that action in the module where the table is defined. Don't forget to add your csrf_token.

  def super_cool_custom_action(socket, item, csrf_token) do
    link "SUPER AWESOME", to: Routes.super_cool_path(socket, :custom_action, item), "data-confirm": "Are you sure?", csrf_token: csrf_token
  end

Link to this section Summary

Functions

Builds an individual button, takes an atom representing the action, and the assigns map

Link to this section Functions

Link to this function

build(atom, assigns)

View Source
build(:new, map()) :: {:safe, iolist()}

Builds an individual button, takes an atom representing the action, and the assigns map

Link to this function

build(custom_action, entry, assigns)

View Source
build(atom(), atom(), map()) :: {:safe, iolist()}