Masu.Write.Change (Masu v0.7.0)

Copy Markdown View Source

A change of a row in a Masu.Write:

  • index - its place in the write;
  • id - the row's id (nil for a new row);
  • row - the row, as the grid's source reads it now (nil for a new row; for :restore, the row as it was deleted);
  • params - for :update and :create, the values by the columns' fields, as strings, as the browser sends them (%{"total" => "11.50"}), which a changeset casts as it does a form's; an empty value is nil;
  • keys - the keys of the columns the params are of;
  • before - for :update, the value of each cell that the person saw, by the column's key.

Summary

Types

t()

@type t() :: %Masu.Write.Change{
  before: %{required(String.t()) => term()},
  id: term(),
  index: non_neg_integer() | nil,
  keys: [String.t()],
  params: %{required(String.t()) => term()},
  row: term()
}