Skip to content

Commit

Permalink
add note about array returns from beforeInsertRow() and beforeUpdateR…
Browse files Browse the repository at this point in the history
…ow()

fixes #3
  • Loading branch information
Paul M. Jones committed Sep 7, 2020
1 parent 2d2a2be commit a25723e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions docs/events.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ function afterDeleteRow(
) : void
```

> **Note:**
>
> The methods `beforeInsertRow()` and `beforeUpdateRow()` optionally return an
> array. If they return an array, that array's key-value pairs will be used for
> the insert or update. Otherwise, the difference between the Row's previous
> values and its current values will be calculated, and their difference will be
> used for the insert or update.
For example, when you call `Table::updateRow()`, these events run in this order:

- `beforeUpdateRow()`
Expand Down

0 comments on commit a25723e

Please sign in to comment.