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

Event action type - renders a button that triggers a LiveView event.

Used for custom actions that need to send events to the component/parent.

## Usage

    row_actions do
      action :approve, type: :event, event: "approve_record"
      action :archive, type: :event, confirm: "Are you sure?"
    end

## Payload

By default, sends `%{id: record.id}`. Use `:payload` for custom data:

    action :process, type: :event, payload: fn record ->
      %{id: record.id, status: record.status}
    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*
