# `MishkaGervaz.Table.Types.Action.Edit`
[🔗](https://github.com/mishka-group/mishka_gervaz/blob/v0.0.1-alpha.3/lib/mishka_gervaz/table/types/action/edit.ex#L1)

Edit action type - renders a button that sends the record to the form component.

Dispatches a `row_action` event with the action name and record ID, which is
intercepted by the table events handler to send directly to the form component
via `send_update`.

## Usage

    row_actions do
      action :edit, type: :edit
      action :edit, type: :edit, js: fn _record -> JS.exec("data-show-modal", to: "#form-modal") end
    end

## JS Hook

When `js` is set, the user's JS commands run first, then the push event is chained:

    action :edit, type: :edit, js: fn _record ->
      JS.exec("data-show-modal", to: "#form-modal")
    end

See `MishkaGervaz.Table.Types.Action` (registry),
`MishkaGervaz.Table.Behaviours.ActionType`,
`MishkaGervaz.Table.Entities.RowAction`, and
`MishkaGervaz.Table.Entities.BulkAction`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
