Fieldia

Lists and search

A page whose layout is a list shows its model's records as a table: a page at a time, in the order a header asks for, each row opening its record. A search bar narrows it, groups it, and keeps searches as favourites; the page's buttons act on the records chosen.

{
  "fieldia": "0.13",
  "id": "customers",
  "title": "Customers",
  "data": { "kind": "record", "model": "partner" },
  "fields": {
    "name": { "type": "char", "label": "Name" },
    "country_id": { "type": "many2one", "label": "Country", "relation": "country" },
    "state": { "type": "selection", "label": "Status", "options": [
      { "value": "active", "label": "Active" }, { "value": "blocked", "label": "Blocked" } ] },
    "credit_limit": { "type": "monetary", "label": "Credit limit", "currencyField": "currency_id" },
    "currency_id": { "type": "many2one", "label": "Currency", "relation": "currency" }
  },
  "layout": {
    "type": "list",
    "id": "customers-list",
    "columns": ["name", "country_id", "state", "credit_limit"],
    "sort": [{ "field": "name" }],
    "pageSize": 40,
    "searchFields": ["name", "country_id", "state"],
    "filters": [
      { "id": "active", "label": "Active", "filter": [{ "field": "state", "op": "=", "value": "active" }] },
      { "id": "big", "label": "Credit over 100,000", "filter": [{ "field": "credit_limit", "op": ">", "value": 100000 }] }
    ],
    "defaultFilters": ["active"],
    "groupBy": ["country_id", "state"],
    "actions": [{ "type": "button", "id": "archive", "label": "Archive", "action": "archive", "confirm": "Archive the chosen customers?" }]
  }
}
KeyWhat it does
columnsThe fields shown, in order. Each value reads as the form shows it: a choice by its label, a link by its record's name, an amount in its currency — a currencyField is fetched though it is not a column.
sortThe order the list opens in. A header click puts its column first, then the other way; with Shift a click adds its column after those chosen — again, the other way; a third time, it goes — a number beside each header saying its place. This order breaks the ties.
pageSizeRecords to a page, 1 to 500; 40 when left out.
searchFieldsThe fields typed text is looked for in; the columns when left out.
filters · defaultFiltersNamed filters for the menu, and the ones the list starts with. A filter compares with values, never with another field; or names a period a date falls in, counted from today — see lists that add up.
groupByThe fields the menu offers to group by; a date by its year, quarter, month, week or day.
actionsButtons for the records chosen. A confirm asks first.
mapThe records on a map too, beside the table or instead of it: see on a map.
calendarThe records on a calendar too, by day, week or month or as an agenda, a column for each person or room: see on a calendar.
ganttThe records as bars on a timeline too, by days, weeks or months, in groups, joined to the records each waits for: see on a timeline.
cellsEach column's cells, by its field: a widget (dot, a state's dot in options.colours or tones), a lead icon from another field's value, a width in characters, or in pixels for the whole column ("200px") as a tracker sizes its grid's (words past it end in “…”, a header cut short shows its whole name when pointed at; every column sized, the table keeps them and scrolls sideways in its card when wider), an align, a total (see lists that add up), and its header's rule where the theme parts the columns (Fluent's): false for none, as a tracker draws a column people cannot size, or "42px" to set it in from the column's end, before the room a tracker keeps there for a row's tools. See a backlog.
choosefalse: no box to choose a row, and so no buttons for rows chosen.
sortablefalse: a ranked list, such as a backlog, keeps its own order (sort): its headers are words, with no press and no arrow, the order still said by aria-sort.
search · filterFields · filterLabels"fields": a keyword box and a list of values to tick for each of filterFields, in place of the search bar; filterLabels gives a filter its own, shorter name on the bar, by field ({ "iteration": "Iteration" } for Iteration Path), translated with the page's words.
filterRanges · filterCounts · filterSheetA number's or a date's range on the filter bar — From and To, a press for each least value ({ "bedrooms": { "atLeast": [1, 2, 3, 4] } }) — one chip; how many records each value, named filter and favourite finds, beside it; and on a phone the filter bar's fields in a sheet with Show 37 homes: see filters a buyer and a sales team expect.
searchToFiltertrue: a search typed in plain words — “villas in New Cairo under 15M” — turned into the list's own filters by your app's AI, as ✦ beside the box is pressed, with Undo: see AI help. Hidden where the data source has no searchToFilter.
parentFieldRows nested under their parent by this link to the list's own records, with Expand all and Collapse all.
loadChildrentrue, with parentField: a tree too big for a page, each parent's children asked as it opens — see a tree too big for a page.
endlesstrue: rows load as the list is scrolled, in place of its pages — see loaded as you scroll.
sequenceFieldThe whole number the records are ranked by: a row carried to another place by its grip, or moved with Alt and an arrow, writes it — see rows re-ranked by hand.
detailWhat a row opens to in place, under it: its record's lines, or the records pointing at it, a page at a time — see lists people work in.
exporttrue: Export in the list's bar. Off unless said, as Edit is: see taking records away.
bulkEditEdit, for the rows chosen: true offers the columns one value can set, a list of fields offers those. Off unless said: see changing many at once.
card · galleryEach record as a card where the list is as narrow as a phone, and a gallery of cards on the switcher on any width: see cards, a gallery, and columns people shape.
optionalColumnsThe columns a person may hide, each "show" or "hide" at first: a Columns menu in the header to show, hide and order them, a header dragged to move one, a header's edge to size them, kept for each person — see columns people shape.
rowTones · rowBold · rowBoldLabel · rowButtonsEach row's tone and bold while a condition on its record holds — with words, a key over the rows — and buttons on each row, each shown by a condition on it, pressed with that record alone: see richer rows.
importImport, in the list's bar: records made from an Excel or CSV file. true offers every field a cell can fill, a list of fields offers those. Off unless said: see bringing records in.
editableIts cells changed in place, each row saved as it is left, a row added at the end: true for every column a cell can change, { "fields": […] } for those, "add": false for no row added, "open": true for an Open button on each row. Off unless said: see cells changed in place.

A list shows records, so its page's data is a record's: the page check refuses a list of responses, and a column, a sort, a search field or a group that names no field.

The records, from your data source

Two more methods of the data source feed a list:

list?(request: { model, fields, filter, sort, offset, limit }): Promise<{ records: { id, values }[]; total: number }>;
groups?(request: { model, field, filter, interval?, weekStart?, timeZone? }): Promise<{ value, label, count }[]>;
totals?(request: { model, filter, totals, groupBy?, interval?, currencies? }): Promise<{ count, totals, groups?, currencies? }>;

filter arrives resolved, as a link's search filter does: { any: [...] } is an OR, { all: [...] } an AND. sort is [{ field, desc? }]; for a map's Nearest first, [{ field, near: { lat, lng, longitude? } }]: the records nearest that place first, those with no place last (the field a GeoJSON point, or a latitude whose pair longitude names). A source that cannot sort by distance leaves its order as it is. For groups, a group's value is what records share (a linked record's id), null for the records with none; the list asks for each group's records with that value as one more condition. createMemoryDataSource() does both, empty values last whichever way a list is sorted.

Lists that add up, and filter by time

A column can add up: its cells entry says how — "sum", "avg" (the average), "min" (the lowest), "max" (the highest) of a number, or the "count" of records holding a value in any column. A named filter can be a period a date falls in, counted from the day the list is looked at, so it is right every day. And a date in groupBy groups by its year, quarter, month, week or day.

{
  "type": "list", "id": "invoices-list",
  "columns": ["name", "partner_id", "city", "invoice_date", "due_date", "state", "amount"],
  "cells": { "amount": { "total": "sum" } },
  "filters": [
    { "id": "overdue", "label": "Overdue", "filter": [{ "field": "state", "op": "=", "value": "sent" }], "period": { "field": "due_date", "is": "overdue" } },
    { "id": "this_month", "label": "This month", "period": { "field": "invoice_date", "is": "thisMonth" } }
  ],
  "groupBy": ["city", "invoice_date"]
}

Nothing new to filter: a period reaches the data source as plain conditions — { field: "due_date", op: "<", value: "2026-10-14" }, or >= and < on a span's first days (on their first moments, as instants, for a date and time). The data source's optional totals adds up, and its groups groups a date by a span:

// Group By month: each group's value is its span's first day; the page writes its words.
groups({ model: 'invoice', field: 'invoice_date', filter, interval: 'month', weekStart: 1, timeZone: 'Africa/Cairo' })
  // → [{ value: '2026-09-01', label: '2026-09-01', count: 4 }, { value: '2026-10-01', label: '2026-10-01', count: 7 }, { value: null, label: '', count: 1 }]

// The totals row, the sums on each heading (groupBy), the rows ticked (one more condition: id in the ids).
totals({ model: 'invoice', filter, totals: { amount: ['sum'] }, groupBy: 'city', currencies: { amount: 'currency_id' } })
  // → { count: 23, totals: { amount: { sum: null } }, currencies: { amount: null },
  //     groups: [{ value: 'cairo', label: 'cairo', count: 12, totals: { amount: { sum: 4312550 } }, currencies: { amount: { id: 1, label: 'EGP' } } }, …] }

spanStart(value, interval, { weekStart, timeZone }) from @fieldia/core finds the span a value falls in as the list counts it, for a source that groups in JavaScript; a backend groups by its own (SQL's date_trunc). A source without totals shows no totals — no row, no sums; one that leaves interval out groups by the value itself, which the list then shows as it is. createMemoryDataSource() does it all. Try the invoices.

Filters in groups

A named filter's group is a word that puts it with others, as Odoo's <separator/> does between filters: the filters on of one group find any of them, the groups find what each finds, with the rest of the search. Overdue in a group of its own and the periods in another make This year with Overdue this year's overdue invoices:

"filters": [
  { "id": "overdue", "label": "Overdue", "filter": [{ "field": "state", "op": "=", "value": "sent" }], "period": { "field": "due_date", "is": "overdue" }, "group": "due" },
  { "id": "this_month", "label": "This month", "period": { "field": "invoice_date", "is": "thisMonth" }, "group": "invoice_date" },
  { "id": "this_year", "label": "This year", "period": { "field": "invoice_date", "is": "thisYear" }, "group": "invoice_date" }
]

A group is one word: "group": "due date" is refused. group came in format 0.14: a page that uses it says "fieldia": "0.14", which stampPage writes. From an Odoo or Flectra screen, searchViewFilters(arch) from @fieldia/core reads its search view: each <filter> with a domain a named filter, each <separator/> starting a group, its Group By and the fields its box searches — and says what it leaves out (a domain worked out on the server, such as uid or today's date; a !; a date's own periods). In the designer, a filter's Group box sets it.

A backlog: cells, a filter bar, rows under their parent

A list can read as a work tracker's backlog. "search": "fields" puts a filter bar over it: Filter by keyword looks in the search fields, and each field of filterFields has a list of its values to tick — a choice's options, yes and no, the records a link or links hold — its button muted until values are ticked, then saying them. ↓ opens a list, the arrows move, Space ticks, Escape closes; × clears every filter, and the gear chooses which fields the bar offers, kept in the viewer's preferences. A default favourite search starts it with values ticked. Beside it the list says how many records the filters leave — 42 homes, in the page's words for its records — in its table, its gallery and on its map alike, as its pager goes under the rows and shows only past a page.

{
  "type": "list", "id": "backlog", "columns": ["order", "work_type", "title", "state"],
  "choose": false, "sortable": false,
  "search": "fields", "filterFields": ["work_type", "state", "area", "iteration", "tags"],
  "filterLabels": { "iteration": "Iteration" },
  "parentField": "parent_id",
  "cells": {
    "order": { "align": "start", "width": "59px", "rule": false },
    "work_type": { "width": "36px" },
    "title": { "width": "911px", "rule": "42px", "lead": { "field": "work_type", "looks": { "bug": { "icon": "bug", "colour": "#cc293d" } } } },
    "state": { "width": "68px", "widget": "dot", "options": { "colours": { "new": "#b2b2b2", "active": "#007acc" } } }
  }
}

Rows under a parent on the same page sit under it, each depth further in; a parent's toggle, or → and ← on its row (turned round right to left), folds it. A row opened in a dialog comes back: when onOpenRecord answers with a promise, its row is lit (aria-current) while the record is open, the list asks for its records again once it settles, and the row has the focus back. handle.openRecord(id) opens one the same way from the app; for a record named in the address as the page loads, { lit: false } leaves its row unlit, as no row was pressed. handle.reload() asks again, after a new record is made. With the Fluent theme the table reads as the tracker draws it: small muted headers parted by short rules and standing a little in from the words under them, rows 36 pixels tall with no lines between them, a slim scroll bar. Try the backlog.

Filters a buyer and a sales team expect

A filter bar can say how many records each of its values finds, take a number's or a date's range as one filter, and fold into a sheet on a phone:

{
  "type": "list", "id": "homes", "columns": ["photo", "name", "kind", "district", "price", "bedrooms", "area_m2"],
  "search": "fields",
  "filterFields": ["kind", "district", "price", "bedrooms", "area_m2", "amenities", "listed_on"],
  "filterRanges": { "bedrooms": { "atLeast": [1, 2, 3, 4, 5] }, "area_m2": {} },
  "filterCounts": true,
  "filterSheet": true
}

An app that asks for none of them has its lists as before. Try the homes to buy or a sales team's queue.

Opening and acting on records

A row opens its record by a click or by Enter; the app decides what that means. A list's button hands the app the records chosen, as recordIds, in the order they were chosen:

mountViewer(host, {
  page: customers,
  dataSource,
  onOpenRecord: (id) => router.navigate(`/customers/${id}`),
  onAction: ({ action, recordIds }) => action === 'archive' && api.archive(recordIds),
});

In React it is the onOpenRecord prop, in Vue the @open-record event, in Angular the (openRecord) output. After a button, the list asks for its records again.

Taking records away, changing many at once

Every record that matches. With every row on show ticked, the bar offers Select all 1,284 that match. The list asks your source once for their ids (list({ …, allIds: true, limit: 0 })), and its buttons, Export and Edit then get every one; turning a page keeps them ticked, a new search, Clear or the header's box lets them go. A source that answers with fewer ids than match is never called “all”: the bar says 1,000 of 1,284 could be selected. A source that ignores allIds is read through a page at a time, its own page size kept, up to 10,000 ids, and says how many of how many past that.

Export, in the list's bar, writes the rows ticked — or, none ticked, every record the search finds — as an Excel workbook or a CSV file named after the list and the day (Contacts 2026-10-16.xlsx): the columns the list shows, in its order, under a header row, each value as a person reads it there — a choice by its label, a link by its record's name, yes or no in words. In the workbook a number, an amount and a day stay numbers, in the format the list reads them in (an amount with its currency, E£ 250,000.00, a dinar's three places), so they still add up and sort; its header row stays in view and filters; a page read right to left gives a sheet that runs right to left. The workbook is written in the browser, in the list's part, with no library. A CSV file is marked as UTF-8, its values parted by a comma, or by a semicolon where the page's language writes a decimal comma, as a spreadsheet there reads it; its numbers and amounts are written as a spreadsheet adds them — digits and the decimal mark, no grouping and no sign (250000.00) — each amount's currency in a column of its own beside it, or in the header where the field has one (Amount (EGP)), and its days as ISO writes them (2026-10-15, 2026-10-15 14:30). Words a spreadsheet would run as a formula — a value starting =, +, - or @, a tab or a line return, or their fullwidth forms — get a ' before them, so opening the file runs nothing a person typed ('=HYPERLINK(…) stays words); Import reads such a cell back without it. The browser writes at most 50,000 records and says how many it left out; your source's exportRecords writes a bigger one on the server (see many records at once). A list offers it with "export": true: off unless asked, so an app that asks for neither Export nor Edit shows no new button.

Edit, with bulkEdit, sets one field to one value in each record chosen. A dialog asks the field, then the value in that field's own box, with its rules: a required field cannot be emptied, a number keeps its least and most. Then the question — Update 24 records? Status becomes “Customer”. — and the records are written: by your source's writeMany, a thousand at a time, or by save per record, four at once, each with the version it was listed at, so a record changed since is refused rather than written over. A record its row says this person may not change (can.edit, can.readonlyFields) is never sent; what the source refuses is named with its reason; the rest stays done. What was not changed stays chosen, and the list says, record by record, why: Giza Plaza: A blocked contact's status is changed by the credit team.

{
  "type": "list", "id": "contacts", "columns": ["name", "company", "state", "owner_id", "newsletter"],
  "bulkEdit": ["state", "owner_id", "newsletter"],
  "export": true
}

A field one value cannot set — links of many, a table of lines, files, a read-only or worked-out field — is never offered, and the page check refuses one named. The fields a bulkEdit of true offers are bulkEditFields(page, list) from @fieldia/core. Try it on 1,284 contacts.

Cards, a gallery, and columns people shape

On a phone, cards. With card, a list's rows become cards where the list is 520px wide or less: the record's title, a picture — or the person's initials where there is none — a few lines and its status as a pill, each by field. "card": {} takes them all from the columns: the name as the title, the first picture column as the photo, the first column drawn as a pill or a dot as the status, the next three as lines. A card is its row: its box ticks it (and the header's box, Select all, every card), a press opens it, its own buttons are under it, its tone is on its edge, the Group By headings run across the cards and the totals stay in sight under them as they scroll — an invoice on a phone shows its amount and its status, and the list's total with it.

A gallery, on any width. With gallery, the switcher offers Gallery: the same rows as cards side by side, their pictures large — homes, products, people. "opens": "gallery" opens the list on it; "size" is small, medium (unless said) or large. The arrow keys move along a line of cards and to the card above or below.

{
  "type": "list", "id": "homes", "columns": ["photo", "name", "offer", "price", "bedrooms", "district"],
  "cells": { "photo": { "widget": "image" }, "offer": { "widget": "badge", "options": { "tones": { "sale": "success", "rent": "info" } } } },
  "card": {
    "title": "name", "image": "photo", "status": "offer", "labels": false, "lead": true,
    "fields": ["price", ["district", { "field": "bedrooms", "unit": { "one": "bedroom", "other": "bedrooms" } }]]
  },
  "gallery": { "opens": "gallery" },
  "rowButtons": [{ "type": "button", "id": "book", "label": "Book a viewing", "icon": "calendar", "action": "book_viewing" }]
}

Richer rows. A column's cells may be drawn as a pill ("widget": "badge", in options.tones or options.colours by value, as a dot is), links as chips (tags), a picture's thumbnail (image) or a round one with a person's initials where there is none (avatar), a number as a bar (progressbar, of options.max, 100 unless said), hours and per cents as a table's cells write them (duration, percentage), and a phone with a call and a WhatsApp link ("widget": "phone", "options": { "links": true }). Each row takes a tone while a condition on its record holds, the first that holds (rowTones), its words in bold while one does (rowBold), and buttons of its own (rowButtons): each shown by its invisible read on the row's record, a press running its steps with that record alone (recordIds: its id), never opening it. Say what a tone or the bold means — a tone's label, "rowBoldLabel": "Your own contacts" — and a key over the rows shows each tone's swatch and a bold sample with those words, read by a screen reader as a list; without words, no key.

Columns people shape. With optionalColumns — the columns a person may hide, each "show" or "hide" as the list opens — the header's end has a Columns menu: a box to show or hide each of those, Move up and Move down (or Alt with an arrow) for every column but the name column, and Reset. A header dragged sideways moves its column: its ghost follows the pointer, the other columns slide aside to make its place and a line stands where it goes; let go, it is there; Escape puts it back. A press that does not move still sorts; on a phone or a tablet a finger resting a moment on a header lifts its column, a tap sorts and a swipe scrolls; right to left, mirrored. The list's name column — its first, held in view — stays first: its header sorts and lifts nothing, and a column carried before it goes right after it, so the names never scroll away. A screen reader hears where a column went (“Phone moved to place 2 of 8”), from the menu too. A header's edge drags to size its column, and its grip takes the arrow keys; twice on it, the page's width again. The header and the first column stay in view as the rows scroll, down and sideways, and the Columns button is held at the header's end, in sight however wide the table. What the person chose is kept in the viewer's preferences — the browser's storage, unless the app gives a store of its own — by page and list, as [{ colId, width, hide }] in their order, as a table of lines keeps its columns; a column the page has added since takes its place, one it took away is let go. Export writes the columns shown, in their order.

{ "type": "list", "id": "contacts", "columns": ["name", "company", "country_id", "state", "phone", "email"],
  "optionalColumns": { "company": "show", "country_id": "show", "phone": "hide", "email": "hide" } }

The cards and the gallery come in a part of their own (fieldia.cards.js), and so do the columns a person shapes (fieldia.columns.js): a list that asks for neither loads neither. In the designer: a list's Rows, Cards and gallery in its panel; a column's way of drawing, its links and whether people may hide it in the column's. Homes as a gallery · contacts whose columns you shape (narrow the window: cards).

Bringing records in from Excel or CSV

With import, the list's bar offers Import: a customer's own spreadsheet made records, checked before anything is saved. Its dialog comes in a part of its own, the first time it is pressed.

  1. A file, chosen or dropped: an Excel workbook (.xlsx), read in the browser — its zip opened with the browser's own DecompressionStream, its XML read with no library; its days, its numbers and its yes or no kept as the workbook keeps them, its first sheet read and another picked — or a CSV file, its characters' encoding and its separator guessed: UTF-8 with or without its mark, UTF-16 as Excel's Unicode text saves it, the Windows code page of the language it was written in (Arabic's Windows-1256, Western Europe's Windows-1252, …), commas, semicolons, tabs or bars; each said, and changed by the person where the guess is wrong — characters picked that its bytes say it is not in are said, with the set that reads it (Its characters look wrong read as Arabic (Windows-1256): this file reads as Unicode (UTF-8).). Its first row names the columns; a file of that row alone says no rows under the header, with nothing to check.
  2. Its columns matched to the page's fields: by a field's name or its label in any of the page's languages, in any case, its accents and marks aside — E-mail fills Email, البلد fills Country — each with its first value beside it and a picker of the field it goes into, or Leave out. What is left out is said, and so is a required field no column fills.
  3. Every row checked by the page's own rules before anything is written: each cell read as its field's box reads what is typed — a number in any script with the page's marks, a day in the page's order, an amount in its record's currency, yes or no in any of the page's languages, a choice by its label, a link by its name through your source's search (none or several of that name said, never the first taken), a phone the world over where its column reads phones so — then required, the most characters, the least and most, the places. The rows that would be refused are named with why (Row 13: Status: nothing is called “Prospect”) and downloaded, with why in a last column, as a file to fix — its cells as the file had them (a workbook's numbers, days and yes or no kept so), its columns under the labels of the fields they were matched to, so it matches by itself when it is brought in again; the first rows show as they will be saved.
  4. Written: by your source's createMany, five hundred at a time, or a save of each as a new record, four at once — how far it has got said, and Stop between two. The list then says how it ended — 10 of 17 records imported. Not imported: each row with why, those your source refused among them — and offers Undo the import, which deletes the records it made through delete, after a question, and names any it could not.
{
  "type": "list", "id": "contacts", "columns": ["name", "company", "country_id", "state"],
  "import": true
}

true offers every field a cell can fill — words, a number, money, yes or no, a date, a choice, a link or links by their names — never a read-only or worked-out field, a table of lines or a file; a list of fields offers those, and the page check refuses one no cell can fill. A link is offered where your source can search, a choice the app lists where it can give its options; Import itself where it can createMany or save. The browser reads at most 50,000 rows at a time and says so plainly; your source's importRecords takes a file of any size on the server (see many records made at once). The fields true offers are importFields(page, list) from @fieldia/core. Try it on the contacts, with the workbook and the CSV file its how-to offers, a few rows wrong in each.

A block pasted into a table of lines. Rows copied from a spreadsheet and pasted in a cell of a table of lines go each on its own line from that cell, each cell read as its column reads what is typed — a link by its exact name — as the grid takes them; a row whose name reads as no record is not pasted at all; rows past the last line add lines, as many as the table may have, and what a cell could not take is named with why under the table.

Cells changed in place

With editable, a list is kept the way a price list, a week's hours or a pipeline's stages are: each cell changed where it stands, no record opened. A press on a cell, or Enter on it, opens it in its field's own box — the box a form draws, with its rules: what can never be valid refused as it is typed, a link found by its name, hours typed as hours and minutes where the column draws them so ("cells": { "hours": { "widget": "duration" } }) — its whole value chosen, so what is typed replaces it, as in a spreadsheet; a second press puts the caret where it is pressed, and F2 after the value, to change within it. A key typed on a cell starts it with that key, as a spreadsheet does; a yes or no pressed is answered by the press. Tab and Shift+Tab go from cell to cell — those people may change, in the order a person put the columns in, a hidden one passed — and on to the next row; past the last, a row is added. Enter takes the cell and goes down its column; Escape puts back what it held; on a cell at rest the arrow keys move between cells, and Escape puts back the whole row.

Each row is saved as it is left — the focus gone to another row, the search, the pager or anywhere on the page — through your source's save: the fields the person changed alone, as a save of some fields (partial: true), with the version the row was listed at. A value worked out from the row's cells (compute) follows as they are typed, and waits — a dash, said in words — while one of them holds text that does not read or an answer the page refuses: Fix Minutes to see Per hour. A row refused stays as typed, why said under it — the page's own rules (Not saved: Minutes must be at least 5.) or your source's (saveRefused: Not saved: Hana Wael would work 54:30 hours this week: the labour rules allow 48.) — with Put back; text that does not read stays in its cell, marked, until it is put right. Someone else's save first is said under the row as a record's page says it, with Reload and Keep mine (a source that keeps versions). A search, a page turned or a sort waits for the saves on their way; a row whose work is not saved stays in sight at the end of the list until it is saved or put back. Ctrl+Enter saves the row at once.

Add a line under the table (Add a service, in the words the page names its records by) adds a row at the end, open at the first cell a new record needs (the first required and empty, else the first), saved as a new record once it is left; left with nothing in it, it goes. A block pasted from a spreadsheet on a cell goes across the columns shown and down the rows, as a table of lines takes it — each cell read as its box reads typing, a link by its name — rows past the last added; one that changes or adds more than one row asks first ("Paste 40 rows: change 7 and add 33?"). Then each row is saved, and rows of records given the same change are written in one writeMany where your source has it; rows refused for the same reason are said once under the list ("33 rows not saved: Service is required."), each still marked, with one button for them all. For a few seconds after, Undo — or Ctrl+Z — puts the rows changed back as they were, saved again, and takes away the rows added (through your source's delete, where they were saved). On a phone, where the rows are cards, a card is changed in a sheet over the list, and saved as it closes.

{
  "type": "list", "id": "services", "columns": ["name", "category", "minutes", "price", "per_hour", "active"],
  "editable": true
}

true changes every column a cell can change — words, a paragraph, a number, money, yes or no, a date, a date and time, a choice, a link and links as tags, neither read-only nor worked out; { "fields": ["price", "minutes"] } those of its columns; the page check refuses one no cell can change. A row your source says this person may not change (can.edit: false, or every cell it could change in can.readonlyFields) shows a lock at its start, your source's why (can.reason) as its tip; a press on it, or Enter, says that why under it — "This stage can't be changed here" where none is given — or opens the record where your app opens records. A cell of can.readonlyFields is drawn as it is; a press on a cell that cannot change opens the record, as a list's row always did, and "open": true gives each row an Open button, where your app opens records. Nothing new for a data source: see your data. It comes in a part of its own (fieldia.editable.js), loaded only for such a list. In the designer: a list's Change cells in place. A clinic's price list · a week of staff hours · a pipeline's stages.

A text kept in several languages (translate) is never changed in a cell: a cell holds one box, and each language is typed by a person under its switch, on the record's own page — with true its column is read as ever and a press on it opens the record; named in fields, the page check refuses it, saying why. A row knows nothing of approvals: a record waiting for one is locked in such a list only through the can.edit your source gives its row. Not done yet, for 0.29: a list page's own on steps do not run in a row's form; in someone else's save, a worked-out column counts as you both changed, as on a record's page; startValues fills a new row from the list's fixed = conditions, but not a link.

On paper

Print, in the list's bar with "print": true, prints every record the search finds — each page of them asked of your source, as Export asks for every match, up to 10,000, saying how many it left out past that — the columns as the list shows them (those a person chose with optionalColumns, in their order — moved from the Columns menu or by dragging a header — as Export writes them; a table even from a phone's cards), each value as its cell says it, under the list's Group By headings with their counts and their sums in their columns, the totals under them all. Over them: the list's title, its filters in words, how many, the day it was printed, and the page's print logo and words; its footer at the foot of every sheet, where the browser keeps room for it there (Chromium, Firefox). The list itself is left off the paper, and the printout goes once it is printed. Ctrl+P alone prints the rows on screen, in the person's columns, without the bar, the boxes, the rows' buttons and the Columns button. Print the invoices, grouped by customer.

{ "type": "list", "id": "invoices", "columns": ["name", "partner_id", "invoice_date", "amount"],
  "cells": { "amount": { "total": "sum" } }, "groupBy": ["partner_id"], "print": true }

On a map

With map, a list shows its records on a map as well, drawn by @fieldia/map on the provider the app chooses. The map and the table share one search and one choice: a pin lights its row and a row its pin, a home chosen on its card is ticked in the table, and the list's buttons act on it. A pin opens a card with the record's picture, a few of its fields, a box to choose it and a button to open it; pins that crowd become a bubble with their count. Once the map is moved, Search this area puts the area into the search bar as a search of its own; the map's own tools draw one instead — a polygon, a box or a circle, by mouse, finger or keys — searched as In the area drawn.

"map": {
  "latitude": "lat",
  "longitude": "lng",
  "pin": { "label": "price", "money": { "home": "EGP" }, "tones": [{ "tone": "info", "when": "offer == 'rent'" }] },
  "card": {
    "title": "name", "image": "photo", "href": "link", "labels": false, "lead": true,
    "fields": ["price", ["district", { "field": "bedrooms", "unit": { "one": "bedroom", "other": "bedrooms" } }]]
  },
  "view": "both"
}
KeyWhat it does
point · latitude longitudeWhere each record is: a json field holding a GeoJSON Point, or two number fields. A record with neither is left off the map, and the map says how many are.
pinIts look — pin, label (its words: a price, a name, minutes away), icon (a car, a scooter, a bike, a shop, Fieldia's own or the app's), photo (a round picture, a courier's face), dot; label the field it says, short as a pin needs (E£9.5M); icon, or iconField for each record's own; image; turn, a number field in degrees, which way it faces; tones, its colour while a condition holds, as a field's are; or widget, the app's own pin by name. An amount's money on the pin, over its field's own (how an amount is written): short unless short is false, home the currency left unsaid — 13.9M, and $ 450K for another — and its field's per, 25K/month on a rent.
cardIts title (the first column when left out), its image, the lines it shows (fields), and open: a button to open the record unless false. A line is a field, a field with words after its value — { "field": "area_m2", "unit": "m²" }, or { "one": "bedroom", "other": "bedrooms" } for the plural the number needs — or several on one line, each with its own label beside its own value — Next follow-up 30 Sept 2026, Agent Mona Adel, a part that does not fit beside the one before moving whole under it — or, with no labels, parted by a dot: Sheikh Zayed · 4 bedrooms · 280 m². labels: false writes the lines bare, their labels said to a screen reader alone; lead: true makes the first line larger and bold, as a home's price heads its card; href: a text field holding the record's address on the web, so its title and picture are links, opened in a new tab or copied as links are; choose: false leaves the box to choose off a map people only look at, a buyer's. Each of the record's words keeps its own direction: an English name on an Arabic page reads as it was typed.
clusterPins that crowd become a bubble, unless false: then each is drawn on its own, and pins near one another overlap, one under another out of a pointer's reach (the keys still reach each).
viewHow the list opens: list, map or both side by side (the map over the table on a narrow screen). People switch between them over the records.
limitThe most records the map shows, 500 when left out; past it, the map says how many it shows of how many. A source that counts its records where they crowd shows them all: see thousands on a map.
heightHow tall the map is: pixels, or fill, as tall as the element it is put in (in a page of your own: a map in your page). As tall as the window allows, 320 to 640 pixels, when left out.
gesturesshared when left out: one finger and the wheel scroll the page past the map, two fingers or Ctrl with the wheel move it. all: the map takes every gesture, one finger pans and the wheel zooms, for a page that is mostly its map.
fitZoomThe closest the map comes when it fits its records in view: 16 when left out; 14 keeps a neighbourhood round a lone record.

The app gives the list its map, as it gives the viewer widgets:

import { mapListViews, azureMaps } from '@fieldia/map';

mountViewer(host, {
  page: homes,
  dataSource,
  listViews: mapListViews({ provider: azureMaps({ key }), center: { lat: 30.04, lng: 31.24 } }),
});

An app's own pin is a function given by name, pins: { courier: (record, { document }) => element }, and drawn wherever a page says "widget": "courier". homeCurrency: 'EGP' in the map's settings is the currency the app's pins leave unsaid, unless a page says its own. Search this area asks the data source for the records within the map's view: between on a latitude and a longitude, or the within condition on a point, { south, west, north, east } in degrees. An area drawn asks for within with { polygon: [[lng, lat], …] } or { center: [lng, lat], radius } in metres, and on a latitude field longitude names the field of its longitude. createMemoryDataSource() answers them all; a server's adapter turns them into its own query. Once the map is moved, the button says how many records the view holds, Search this area (24), when the records on hand can tell; with countArea: true in the maps' settings the data source is asked for the rest (one record, its total), a moment after the map stops. Each time the map stops it sends fd-map-view from its element, { center, zoom, bounds, byPerson }, for an app that keeps the view in its address. Try the homes · try the couriers.

Thousands on a map, counted by your server

A map loads at most limit records and gathers them in the browser. Where a search finds thousands — every listing of a portal, a city's orders — give the data source clusters: the map then shows every record the search finds and loads none of them. It asks for the view's bubbles as the search changes and a moment after the map stops (a run of moves asks once; an answer that comes after a newer ask is dropped), and first for the whole world's, to fit a new search's records in view. Each bubble shows its count, and a press zooms to the box its records lie in; a bubble on one spot, a tower's flats, lists the first 50 of them with how many more. A record that stands alone comes with its values: its own pin, its card, its row lit. The table beside the map pages as ever, and Search this area says how many the view holds from the bubbles drawn, with no question of its own. Shaded areas count by groups, as before; the heat map from afar weighs each bubble by its count, or its weight added up.

async clusters({ model, filter, field, longitude, bbox, zoom, radius, fields, weight, signal }) {
  // bbox: the view, { south, west, north, east }; zoom: the map's (0, the world in one 256-pixel image);
  // radius: how near pins come, in pixels at that zoom, before they crowd: a grid's square to gather by.
  return {
    clusters: [{ lat: 30.06, lng: 31.22, count: 1204, bbox: { south: 30.01, west: 31.15, north: 30.11, east: 31.29 } }],
    points: [{ id: 41, values: { name: 'Villa in Maadi', price: 9000000, lat: 29.96, lng: 31.25 } }],
    unplaced: 12,   // found by the search, with no place: said under the map
  };                // or false: load this search's records, as without clusters
}

field and longitude say where each record is, as the page does; fields are those a point carries for its pin and its card. Most servers gather by a grid of radius-pixel squares fixed to the world at the zoom asked: PostGIS's ST_SnapToGrid, Elasticsearch's geotile_grid, a geohash's prefix. The map gathers the bubbles again where they still come too close. createMemoryDataSource({ clusters: gridClusters() }) answers it from the records it keeps, as such a server does; without clusters a map behaves as it always has. Try 20,000 homes.

The source's bubbles are gathered again at 60 pixels (radius asks for the same), wider than the map's own 48, so bubbles with their counts never overlap. Not done yet, for 0.29: a bubble carries no ids, so a record chosen inside one shows its tick once it stands alone; shaded areas without groups count only the records the map holds — here its points; the one-tag script's memory source does not answer clusters.

On a calendar

With calendar, a list offers Calendar beside its table, drawn by @fieldia/calendar: its records by day, week or month, or as an agenda of the week to come, which a phone opens on. The day has a column for each person or room the page names; records that meet sit side by side, a whole day's sit over the hours, and a line marks now. The calendar keeps to the list's search, filters and favourites.

"calendar": {
  "start": "start", "end": "stop", "title": "patient",
  "colour": "service", "resource": "doctor",
  "views": ["day", "week", "month", "agenda"], "view": "day", "opens": "calendar",
  "firstDay": 6, "hours": { "start": 9, "end": 18 }, "slot": 15
}
KeyWhat it does
start · endWhen each record starts and ends: two datetime fields, or two date fields for records of whole days. With no end, a record lasts an hour (a day) and cannot be stretched. The page check refuses an end of another kind than its start.
titleThe words on each record: a patient, a customer.
colourA field whose value colours each record, the same value the same colour, as a tint that reads light and dark; a value that is a colour (#0f766e) is used as it is.
resourceWho or what each record is with (a link, a choice, text or a whole number): a column for each in the day view, and a record dragged into another's column is theirs. A link's columns are the records its model's search finds.
views · viewThe views offered, of day, week, month and agenda, all four when left out; and the one shown first, the first of them unless said.
openscalendar: the list opens on its calendar; its table when left out.
firstDayThe week's first day, 0 Sunday to 6 Saturday: where CLDR starts it for the region when left out: the page's own, else the reader's where their browser asks for the page's language with one, else where the language is most spoken (Saturday in Arabic and Persian, Sunday in English and Urdu, Monday in German, French, Turkish and Spanish).
hours · slotThe hours the day and the week show, 8 to 20 when left out (a record outside them stretches them), and the minutes a slot holds and a drag moves by: 15, 30 or 60.

People drag a record to another time, day or person, and stretch it by its lower edge; from the keyboard, M on a record opens Move to… for its day, its time and its person, and the arrow keys move between the slots. Each move is saved at once through the data source's save, with the changed fields alone and the row's version, and Undo puts it back — so does Ctrl+Z, and Ctrl+Shift+Z makes it again; a refused save puts it back and says why. The timeline opens on the plan, from its first task (today in view where it fits), and a sign at either edge of the days shown says how many bars run off it. A record whose row says can: { edit: false } stays where it is, saying why. An empty slot pressed, or dragged across, makes a new record: the viewer's onNewRecord gets its start, end and person, or, without it, the record's page from pages opens in a dialog with them filled in.

import { calendarListViews } from '@fieldia/calendar';

mountViewer(host, {
  page: appointments,
  dataSource,
  listViews: calendarListViews(), // with a map too: { ...mapListViews(settings), ...calendarListViews() }
  onNewRecord: (values) => openAppointment(null, values), // or pages: { 'clinic.appointment': appointmentPage }
});

A move saves the fields it changes and no others, with partial: true (see what save receives), and Undo saves what they held before. A record whose start, end or person its list row puts in can.readonlyFields or can.hiddenFields, or the page marks readonly, offers no way to move it. Too many records in one slot to read side by side leave room for +N more, which lists them all. Move to… refuses a day more than ten years from the record's, so a year typed short (26) or long (2062) is caught, and names the year whenever the move leaves the record's own.

The calendar is on the clock of the zone its start field names (timeZone on a date and time), else its page's, else the reader's own: on a page of "timeZone": "Europe/Berlin", its week, today, the hours each record is drawn at and the line for now are Berlin's wherever it is looked at from, the zone's short name (CEST) beside the span; a slot pressed, a drag, a stretch and Move to… write the instant that time is in Berlin, and a record moved keeps the time it really lasts across a change of the clocks. In the hour the clocks repeat, a time is its first; in the hour they skip, it is as far past the change.

The calendar asks list for the records of the span it shows: those starting before it ends and ending after it starts, as date keys or ISO instants, with the list's own search. Its code loads the first time a calendar is shown, in a chunk of its own. A list's switcher takes an app's own views the same way: a function by name in listViews, offered on a list with the page option of its name, or where its offers(node) says, in its own words (label(locale)). Try the clinic · try the booking desk · try the showroom's test drives, on Berlin's clock.

Lists people work in all day

Several orders at once. A header's press puts its column first, then the other way. With Shift held, a press adds its column after those already chosen — by agent, then by date — pressed again with Shift, the other way, and a third time it goes. Each column in the order shows its place beside its arrow (1, 2, 3) once there is more than one; a screen reader hears it after the header's name (sorted 2 of 3, descending), and the first carries aria-sort, as a table says one. The page's own sort breaks the ties after them; your source gets them all in sort, in order — nothing new to answer.

A row opened in place

With detail, an arrow before each row's name opens the row under itself to what its record holds — its lines — or to the records that point at it, a page at a time, to read: an order's lines checked without leaving the list, an approval's items, a booking's contents. Several stay open at once, and stay open as the list asks again; → opens a row from the keys and ← closes it (the other way round right to left), ↑ ↓ pass over what is open, and the row's own press still opens the record. On a phone the arrow is under the card, with its words.

"detail": {
  "lines": "line_ids",
  "columns": ["product_id", "name", "qty", "price", "discount", "subtotal"],
  "sort": [{ "field": "sequence" }],
  "limit": 5
}

Rows re-ranked by hand

A waiting room's queue, a backlog, the order homes are featured in: with sequenceField — a whole number of the records, the list's sort by it — each row has a grip at its start that carries it to another place, the other rows sliding aside to make room (the page scrolls near its edge, Escape puts it back), and Alt with ↑ or ↓ moves the row with the focus a place, its new place said aloud: Omar Nabil moved to place 3 of 12. On a phone each card has its grip.

{ "type": "list", "id": "waiting-room", "columns": ["name", "treatment", "doctor", "arrived", "state"],
  "sort": [{ "field": "turn" }], "sortable": false, "sequenceField": "turn" }

Loaded as you scroll

A phone's feed, a log, results to browse: with "endless": true the next page of rows comes as the end of the rows comes in sight, put after those already there, a phone's thumb ahead — no pages to turn. The count stays, 1–60 of 1,284 entries; the arrows go; Show 30 more waits at the end for a hand or the keys, and ↓ past the last row loads the next and moves on to it. A row's button, a record closed, an export: the list asks again for every row it held, where it was; a new search or another order starts from the first page. On a phone its cards far out of sight skip their drawing until they come near (content-visibility). Your source answers list with offset and limit, as it does for pages. Not for rows under their parent. Try the team's log.

Long lists, light pages

Past a hundred rows shown — an endless list scrolled far, an editable list of a thousand, a tree in one page — only the rows near the view are in the page, a view's height above it and below it; the rest are kept as data, a gap as tall as they are in their place, so the page scrolls as far as it did and a key, a tick or a Tab costs what it does on a page of forty. The table says how many rows it has and each row its place (aria-rowcount, aria-rowindex), ↓ past the last row drawn draws the next, the row with the focus stays where the person left it, Select all chooses every row loaded, a block pasted goes down the rows not drawn yet, what the person reads stays in place as rows above it come and go, and paper prints every row. The browser's find in page sees only the rows in the page: Ctrl F in such a list takes the person to its own search, which finds any record — pressed again there, the browser's own. An app's tests that look for a row among all of them scroll to it or search for it. Cards draw every card.

A tree too big for a page

Rows nested under their parent on one page break once a tree holds more than a page: a chart of accounts, a project's work, a development's buildings and units. With "loadChildren": true beside parentField, the list's pages are its records with no parent, and each parent's children come as it opens — a page at a time, Show 20 more under them — so a parent's children never split across pages. Only a row with children has its arrow: how many each has is asked in one ask for the rows drawn. → opens a row, ← closes it, Collapse all closes every one; Expand all, which would load the whole tree, is not offered. What was open stays open as the list asks again. A search lists its matches whatever their depth, each with its parent named — Bank 3, in Current assets.

// The top: records with no parent, a page at a time, as the pager counts them.
list({ model: 'account', filter: [{ field: 'parent_id', op: 'notset' }], sort, offset: 0, limit: 20 })
// How many children each row drawn has, in one ask: a group's value is the parent's id.
groups({ model: 'account', field: 'parent_id', filter: [{ field: 'parent_id', op: 'in', value: [1, 2, 3] }] })
// A parent opened: its children, a page at a time.
list({ model: 'account', filter: [{ field: 'parent_id', op: '=', value: 1 }], sort, offset: 0, limit: 20 })

Without groups, every row offers to open, and one with nothing under it loses its arrow as it opens. In the rows part (fieldia.rows.js). In the designer: a list's Children load as a parent opens, under its parent link. Try the chart of accounts.

Saved views, kept for the team

Where your data source keeps views, the search bar's menu lists them in place of the favourites the browser keeps: the person's own and those the team shares — Shared by Mona Adel beside another's — each put on with a press: its search, its order and, where people shape the columns, its columns. Save current search takes a name, Use by default and Share with the team; the list opens on the person's own default, else the team's, asked before its records so they come once, already in it. A person's own view has its × (one shared with the team asked first: it goes for everyone); another's is only put on. The same on every device: nothing of it is kept in the browser.

views?({ pageId, model, list }): Promise<SavedView[]>;
saveView?({ pageId, model, list, view: { id?, name, state, shared?, isDefault? } }): Promise<SavedView>;
deleteView?({ pageId, model, list, id }): Promise<void>;

// SavedView: { id, name, state: { facets, sort?, columns? }, shared?, isDefault?, mine?, by? }
// columns as the list keeps a person's: [{ colId, width, hide }], in their order

Your server knows the person by its own sign-in — nothing in a request names them — and tells the page whose a view is with mine and by. A view kept as the default is the only one of its kind (the person's own, or the team's): let go of the one before. A refusal is said under the form in your words, what was typed kept; views that could not be asked are said with Retry, and the list opens on its own search. Without saveView views are put on, none saved; without deleteView, none deleted. createMemoryDataSource({ views: {} }) keeps them. Try the sales team's queue.

On a timeline

With gantt, a list offers Timeline beside its table, drawn by @fieldia/gantt: a Gantt chart of its records, each a bar from its start to its end (or for its days) on an axis of days, weeks or months, in groups under their headings, with an arrow from each record it waits for to its start. Today has a red line; a bar that starts before what it waits for ends has a red arrow and says so. It keeps to the list's search, filters and favourites, and is drawn with the page's own DOM and SVG — no chart library.

"gantt": {
  "start": "start", "duration": "days", "title": "name",
  "group": "phase", "colour": "trade", "dependsOn": "after",
  "zooms": ["day", "week", "month"], "zoom": "day", "opens": "gantt"
}
KeyWhat it does
start · end · durationWhen each record starts (a date or a datetime), and when it ends — a field of the same kind, its last day for a date — or how many days it lasts (an integer or float): one or the other. A duration of 0 is a milestone, a diamond; with neither, a bar lasts a day. A record with no start has its row, saying so.
titleThe words on each bar and its row: a task's name.
groupA link, a choice, text or a whole number whose value groups the bars, each under its heading with the span they take; a heading folds its group away. A choice's groups come in its options' order (a project's phases), others by their first start.
colourA field whose value colours each bar, the same value the same colour; a value that is a colour (#0f766e) is used as it is.
dependsOnA many2many to the list's own records: what each waits for, drawn finish to start. The page check refuses one that links to another model.
zooms · zoomThe scales offered, of day, week and month, all three when left out; and the one shown first, week unless said.
opens · firstDaygantt: the list opens on its timeline; and the week's first day for the weeks' heads, the language's own when left out.

People drag a bar to other days, or drag its start or its end, by whole days; from the keyboard there is one stop for the whole timeline: ↑ ↓ reach the bar above or below, ← → move it a day (as the page reads, so flipped right to left) and with Shift its end, written once the keys rest; Enter opens it, as a row's press does. Each move is saved through the data source's save with the changed fields alone, partial: true and the row's version, and Undo puts it back — so does Ctrl+Z, and Ctrl+Shift+Z makes it again; a refused save puts it back and says why. The timeline opens on the plan, from its first task (today in view where it fits), and a sign at either edge of the days shown says how many bars run off it. A record its row locks (can.readonlyFields, can.edit: false) stays where it is, saying why. The timeline is on its start field's zone's clock, else its page's, else the reader's own, a bar moved keeping its time of day there; and on paper the whole plan fits the page's width.

import { ganttListViews } from '@fieldia/gantt';

mountViewer(host, {
  page: tasks,
  dataSource,
  listViews: ganttListViews(), // with a calendar too: { ...calendarListViews(), ...ganttListViews() }
  onOpenRecord: (id) => openTask(id),
});

Its code loads the first time a timeline is shown, in a chunk of its own. Try a café's fit-out.

What it takes care of