View Source Exzeitable.HTML.ActionButton (Exzeitable v0.5.3)
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
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 Types
@type action() :: :new | :delete | :show | :edit
Link to this section Functions
Builds an individual button, takes an atom representing the action, and the assigns map