# `Masu.Source.List`
[🔗](https://github.com/hattoriai/masu/blob/v0.1.0/lib/masu/source/list.ex#L1)

The source of a grid given its rows: `<.data_grid rows={@users}>`.

The rows are maps or structs. The list filters, searches and sorts them
in the LiveView's process when the query changes, once, and keeps the
result as a tuple, so each block the browser asks for is read without
walking the list. Sorting a hundred thousand rows takes a fraction of a
second; past that, give the grid an Ecto source and let the database do
it.

Text sorts without case, `nil` after every value, and rows that compare
equal keep their order in the list.

## A tree

With the grid's `tree` (a field of the row that holds its parent's id,
or a function of the row), the rows are a tree (`Masu.Tree`): the list
holds every row, and the grid shows the roots and the children of the
rows that are open.

---

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