# `PetalComponents.DataTable.Engine.List`
[🔗](https://github.com/petalframework/petal_components/blob/v4.18.1/lib/petal_components/data_table/engine/list.ex#L1)

The in-memory engine: sort, filter and paginate a plain list of maps or
structs against a `PetalComponents.DataTable.State`.

This is the zero-setup path - the registry examples, the playground and
any app with an already-loaded list get a working table with no database
and no extra dependency. It is deliberately a toy for data that fits in
memory; real query backends (Ecto/Flop adapters, cursor pagination) are
the production wiring layer, not this module.

    {rows, state} = Engine.List.run(all_rows, state)

returns the visible page plus the state with `total` filled in (the
post-filter count), which is what the footer and pagination render from.

Filter semantics by operator - all string comparisons are
case-insensitive, `nil` field values never match:

  * `:contains`, `:starts_with`, `:eq` on strings
  * `:eq`, `:neq`, `:gt`, `:lt` numeric (value coerced from string)
  * `:between` with a `[min, max]` (or `%{"min" => _, "max" => _}`) value
  * `:in` with a list value (select/enum filters)
  * `:before`, `:on`, `:after` on `Date`/`DateTime`/ISO8601 strings

# `run`

Runs the full pipeline: search -> filter -> sort -> count -> paginate.

Options:

  * `:search_fields` - the fields the quick-search term matches
    against (case-insensitive contains). Defaults to every field of
    the FIRST row whose value is a string - which means the default
    set depends on that row's data: a text column that is nil in row
    one is silently excluded, and a loaded UUID column is silently
    included. Fine for a demo; pass `:search_fields` explicitly in
    anything real.

---

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