Search the documentation

Type to search page titles, component names and descriptions.

    Data Display

    FaifoTable

    A selectable, sortable, groupable table island.

    import { FaifoTable } from 'faifo-design'

    FaifoTable is the interactive collection table: selection that survives paging, sorting, grouped rows with their own pagers, and a bounded height with a sticky header. faifoTable is its ketjs- view island and createFaifoTableView renders the first page on the server. Rows come from manager functions or from native URL navigation.

    #When to use

    • Use it for the main table of a collection screen.
    • Selection posts through a named form field, so a bulk action is an ordinary form submission.
    • Each row has one keyboard link; the row the reader came back to is restored by the row anchor helpers.

    #Examples

    Each example is a specimen of the package catalogue, rendered on the server exactly as shown in its code.

    #Faifo table

    Selectable table island with either manager RPCs or native URL navigation. Shown flat, grouped with preloaded rows, URL-driven with an active sort, and with the row the reader came back to marked current beside a selected row. The last specimen delegates paging to its surrounding toolbar. Demo links target this catalogue section; production routes supply real sort, group and page URLs.

    NameRefState
    Ngọc Linh TradingCompanyCUS-00014.250.000 ₫Active
    Trần Minh AnhPersonCUS-0002890.000 ₫Active
    Việt Phát LogisticsCompanyCUS-000312.400.000 ₫Archived
    1–3 / 3
    Bounded table-owned loading rows; selection stays disabled until the read answers
    Initial collection readCustomer
    Delayed refresh retains and dims the previous answer
    Retained result
    Previous result

    Table inside a working surface

    NameRefState
    Ngọc Linh TradingCompanyCUS-00014.250.000 ₫Active
    Trần Minh AnhPersonCUS-0002890.000 ₫Active
    Việt Phát LogisticsCompanyCUS-000312.400.000 ₫Archived
    1–3 / 3
    The row the reader came back to from its record page, beside a selected row
    ReservationGuest
    R-1041Sam Lee
    R-1042Alex Morgan
    R-1043Jordan Park
    An outline: rows indent by level, groups and totals read stronger
    IndicatorCodeEnd of period
    A. Current assets100528,229,831
    I. Cash and cash equivalents110187,900,000
    1. Cash111187,900,000
    B. Non-current assets20036,000,000
    Total assets270564,229,831
    /reservations?page=2#row=R-1042&top=336&left=214Native record links carry the measured row position and table scroll in returnTo. Back and the record header restore that position; unmeasured links centre the row.
    NameKindRefTotalCreated onState
    Ngọc Linh TradingCompanyCUS-00014.250.000 ₫Active
    Việt Phát LogisticsCompanyCUS-000312.400.000 ₫Archived
    Trần Minh AnhPersonCUS-0002890.000 ₫Active
    NameKindRefTotalCreated onState
    Ngọc Linh TradingCompanyCUS-00014.250.000 ₫Active
    Trần Minh AnhPersonCUS-0002890.000 ₫Active
    Việt Phát LogisticsCompanyCUS-000312.400.000 ₫Archived
    Show codeHide code
    import { Code, FaifoTable, Stack, Surface, Text, createFaifoTableView, rowAnchorHref } from 'faifo-design'
    // faifoTableDemoConfig: a catalogue fixture, packages/faifo-design/src/interactions/faifo-table/demo.ts
    // faifoTableGroupedDemoConfig: a catalogue fixture, packages/faifo-design/src/interactions/faifo-table/demo.ts
    
    export const Example = () => (
      <Stack
        items={[
          createFaifoTableView({ id: 'demo-faifo-table', config: faifoTableDemoConfig }).view(),
          <FaifoTable
            columns={[
              { key: 'work', label: 'Initial collection read', cell: (row: { id: string }) => row.id },
              { key: 'customer', label: 'Customer', cell: () => 'Customer' },
            ]}
            rows={[]}
            id={(row: { id: string }) => row.id}
            loading={{ rows: 3 }}
            selection={{ formId: 'catalogue-loading-selection', fieldName: 'selected' }}
            responsive="stack"
            labels={faifoTableDemoConfig.labels}
            maxBlockSize="12rem"
            caption="Bounded table-owned loading rows; selection stays disabled until the read answers"
          />,
          <FaifoTable
            columns={[{ key: 'work', label: 'Retained result', cell: (row: { id: string }) => row.id }]}
            rows={[{ id: 'Previous result' }]}
            id={(row) => row.id}
            busy
            labels={faifoTableDemoConfig.labels}
            caption="Delayed refresh retains and dims the previous answer"
          />,
          <Surface
            title="Table inside a working surface"
            body={createFaifoTableView({
              id: 'demo-faifo-table-in-surface',
              config: faifoTableDemoConfig,
            }).view()}
          />,
          <FaifoTable
            columns={[
              {
                key: 'name',
                label: 'Server collection',
                wrap: true,
                cell: (row: { id: string; name: string }) => <strong>{row.name}</strong>,
                sortHref: '#faifo-table',
              },
            ]}
            rows={[
              {
                id: 'server-row',
                name: 'Semantic server cell with a descriptive product name that wraps while the row grows to keep all of its content readable',
              },
            ]}
            id={(row) => row.id}
            rowHref={() => '#faifo-table'}
            layout="fixed"
            caption="Fixed columns · URL-driven server collection"
            responsive="stack"
            labels={faifoTableDemoConfig.labels}
          />,
          <FaifoTable
            columns={[
              { key: 'id', label: 'Reservation', cell: (row: { id: string; guest: string }) => row.id },
              { key: 'guest', label: 'Guest', cell: (row: { id: string; guest: string }) => row.guest },
            ]}
            rows={[
              { id: 'R-1041', guest: 'Sam Lee' },
              { id: 'R-1042', guest: 'Alex Morgan' },
              { id: 'R-1043', guest: 'Jordan Park' },
            ]}
            id={(row) => row.id}
            rowHref={(row) => `#faifo-table-${row.id}`}
            currentRow="R-1042"
            selection={{ formId: 'catalogue-current-selection', fieldName: 'selected' }}
            selectionState={{ ids: ['R-1041'], onChange: () => undefined }}
            caption="The row the reader came back to from its record page, beside a selected row"
            labels={faifoTableDemoConfig.labels}
          />,
          <FaifoTable
            columns={[
              {
                key: 'name',
                label: 'Indicator',
                wrap: true,
                cell: (row: { id: string; name: string; amount: string }) => row.name,
              },
              { key: 'id', label: 'Code', cell: (row: { id: string }) => row.id },
              {
                key: 'amount',
                label: 'End of period',
                align: 'end',
                cell: (row: { id: string; amount: string }) => row.amount,
              },
            ]}
            rows={[
              { id: '100', name: 'A. Current assets', level: 0, amount: '528,229,831' },
              { id: '110', name: 'I. Cash and cash equivalents', level: 1, amount: '187,900,000' },
              { id: '111', name: '1. Cash', level: 2, amount: '187,900,000' },
              { id: '200', name: 'B. Non-current assets', level: 0, amount: '36,000,000' },
              { id: '270', name: 'Total assets', level: 0, amount: '564,229,831' },
            ]}
            id={(row) => row.id}
            rowLevel={(row) => row.level}
            rowEmphasis={(row) => (row.id === '270' ? 'total' : row.level < 2 ? 'group' : null)}
            responsive="stack"
            caption="An outline: rows indent by level, groups and totals read stronger"
            labels={faifoTableDemoConfig.labels}
          />,
          <Code value={rowAnchorHref('/reservations?page=2', 'R-1042', { top: 336, left: 214 })} />,
          <Text>
            Native record links carry the measured row position and table scroll in returnTo. Back and the
            record header restore that position; unmeasured links centre the row.
          </Text>,
          createFaifoTableView({
            id: 'demo-faifo-table-grouped',
            config: faifoTableGroupedDemoConfig,
          }).view(),
          createFaifoTableView({
            id: 'demo-faifo-table-navigation',
            config: {
              ...faifoTableDemoConfig,
              manager: undefined,
              pager: false,
              sort: { field: 'name', direction: 'asc' },
              columns: faifoTableDemoConfig.columns.map((column) => ({
                ...column,
                sortable: false,
                sortHref: column.key === 'name' ? '#faifo-table' : undefined,
              })),
            },
          }).view(),
        ]}
      />
    )

    #Contract

    #Collections are client islands

    Use ListChrome.commands for a command form that needs the full collection width. The actions slot remains an inline toolbar; command fields use the standard inline field layout.

    Record contexts and commands preserve company, companies, branch, branches and locale from the active URL. RelationManager.requestQuery carries the application’s encoded RPC context for picker reads and writes; a picker never infers tenant ownership from an option. RelationSelect keeps these parameters while its search input changes. resolveParam names a parameter for resolving a selected id absent from primed options; the native value remains selected while its label loads. The same lookup must check ownership for both search and id reads.

    FaifoTable.maxBlockSize accepts the collection runtime’s available viewport budget. The table owns vertical scrolling and sticky headings; omitting it preserves intrinsic page scrolling. SSR omits the budget until the disposable runtime measures the mounted collection and its footer. The catalogue includes a bounded loading table.

    ListChrome.filterMenus composes native Menu choices and DateRangePicker with variant="filter". The slot caps its group to the available panel width, so the controls wrap inside an opened phone disclosure. Do not put FormGrid here: it is a Section form layout whose fractional tracks need a sized working region. Measure individual controls and labels, including the opened phone disclosure; document and table overflow checks alone do not catch collapsed filter controls.

    Every full-page collection (ListPage/ListScreen) renders its filters, results and pager as client islands over one paged read. A list grows from a week of records to ten years of them; rendering every row on the server and re-rendering the page for each filter does not stay fast, and the server cannot keep the reader's place while it does. A new list starts this way; an existing server-rendered list moves to it when it is next changed.

    • Islands and store. The list is three islands that share one store keyed by the collection: controls (ListChrome: search, filter menus, facets, sort, period), results (FaifoTable and the list states) and footer (pager). Their server view reads the query from the URL and renders the frame and a loading state only; the first client render is the same markup, so hydration adopts it. Views stay render-pure; the store owns fetching and history.
    • One paged read. The browser asks one read function for one page of one query through the function transport (POST /_ket/fn/<module>.<search function>). Input is the normalised query: filters, q, sort, page, pageSize (at most 100). Output is { query, total, page, pages, rows, counts, isEmpty }:
      • query is the input as the function applied it (unknown values fall back to defaults, the page is clamped), so the client corrects its URL rather than guessing;
      • rows carry ids and raw values (civil dates, minor-unit money with its currency); the client formats them;
      • counts feed the facets and filter menus in the same read; a group's counts ignore its own filter;
      • isEmpty tells "nothing recorded yet" from "nothing matches". The function enforces permissions and scope. The browser never loads the whole collection or reads per row. A list readable only by whoever may open its page (its rows come from a function in a sensitive bundle) answers through a same-origin module route instead, POST <list path>/read with { href }, which checks the list's own function and answers the same shape; KetSuite's shared backend.row-list* islands read this way (KetSuite docs, design-system.md, "Shared row-list islands"). ListChrome owns wrapping inside its filter group at every width: controls move intact to the next line when the group exceeds the available canvas.
    • URL and history. The query lives in the URL with defaults omitted. Filters, facets, menus, sort headers, period links and pager links are real hrefs that the island follows in place; each decision is a pushState. Search narrows as the reader types (debounced, about 250ms); the first keystroke pushes and refinements replace, so Back returns to the list as it was before the search. popstate reads the URL and never writes. A value the function corrected (a page past the end) is written back with replaceState. Older spellings in old links are still read.
    • Saved records. A record modal over the list announces a save with a cancelable faifo:records-changed. The island reads its page again and calls preventDefault(), so the backend shell does not re-fetch the content slot behind it (see record-modal.md, Collection). The Back that closes the modal lands on the query already on screen (or already being read after the save) and reads nothing; Back onto a page that failed reads it again.
    • Sorting. Prefer FaifoTable.columns[].sortHref/sortLabel and sort for URL-backed column sorting. Do not duplicate those choices in ListChrome.sort. responsive: 'stack' keeps sortable column headers visible above phone summaries; data-has-sort on the table and data-sortable on its headers expose this state. The collection owns allowed directions, page reset and its default business order.
    • Network. Each read aborts the previous one and a late answer is ignored. Recent queries are cached (about 20): Back shows its page at once and reads it again behind it. A read slower than about 150ms dims the rows on screen (data-dimmed, aria-busy) instead of swapping them for a skeleton; the skeleton is for the first load only and has the height of the real table, so nothing shifts when rows arrive. FaifoTable's server form accepts loading: { rows, lines? } (1–100 rows), renders decorative placeholders and disabled selection, and never reads row cells or links before data arrives. busy dims retained rows using the table's own tokens. A client presenter may pass selectionState: { ids, anchor?, onChange } to keep selection across pure renders; the callback stays in the client and is never serialized. BulkActions.clearLabel resets its associated native form as well as issuing the clear-selection command. A collection clears page-local selection on each new answer. ListChrome bulkPresentation="replace" replaces the query toolbar while controlled selection is nonempty and restores its query controls when selection clears. Danger badges use --faifo-badge-danger-text: the existing Faifo red in light mode and its lighter palette step in dark mode, keeping small status text above AA contrast on table and record surfaces without changing global danger colors. Badge owns its intrinsic inline size (inline-size: fit-content), so short labels stay compact in Grid/Stack and column Flex layouts. Long labels still wrap within the available width.
    • States. Loading (skeleton); failed (Notice danger with a retry); offline (Notice warning with a retry, and a new read on the online event); permission denied; empty on first use (with the create action when the reader may create) versus empty after filtering (clear the filters, widen the period). After a failure counts are omitted, never left as a placeholder.
    • Accessibility. Focus stays on the control that changed. PagerBar renders a step that reaches the first or last page as the same element, a disabled link (role="link", aria-disabled="true", tabindex="-1", no href), so the focus on it outlasts the island's render instead of falling to the page. PagerPage also accepts a nullable href and an optional stable id for first/last destinations; it keeps its anchor while disabled. Supply distinct IDs when labels repeat. A polite live region announces the result range ("1–25 of 2,696") and nothing else; a failure notice announces itself and the live region does not repeat it. A sortable header's accessible name says what the link does ("Arrival, sort earliest first").
    • Table. The results island renders FaifoTable in its server form (columns[].cell, sortHref/sortLabel, responsive: 'stack') from the store. FaifoTable's manager mode suits a fixed input without counts or URL state; it is not the collection runtime.
    • Without JavaScript the controls still navigate as links and forms, but rows need the island. This is accepted: the product requires JavaScript for islands.
    • Checks for a list island: the read function's contract (defaults, clamping, counts, empty), server and first client render identical for several URLs, a history harness (push, replace, popstate writes nothing, clamp replaces) proven by mutation, and a slow read that dims instead of swapping.

    The shared collection runtime is not public yet; until it is, a list implements this contract in its own store, and the runtime extracted later must keep it.

    #Opening a record from a collection

    A row of a DataTable/FaifoTable (or ResourceList, DataGrid) and a KanbanCard open their record in the presentation that fits the record, not in one fixed overlay. Choose it once per record kind, and use the same choice for its rows, its cards and its create action. A KanbanCard with href opens anywhere on the card, not only on its title: the title link covers the card, any other control in the card (actions, a link in meta) stays pressable above it, and a draggable card is still dragged as itself. Do not wrap a card in a link or add a click listener to make it openable.

    • Record page (RecordPage, or WorkspacePage for spatial work) when the record is a workspace of its own: several tabs or sections, money or line items, an activity log, work that outlasts a glance at the list, a URL people share, print or open from more than one place (a reservation, a stay, a folio, an order, a product template, a user).
    • Record modal (ModalSheet over the collection) when the record is short and read or edited in the flow of a queue, and the reader goes straight back to the next row (a catalogue entry, a configuration item, a triage task).
    • Peek (Peek in a PeekLayout, see below) only as a first step from a dense spatial view such as a tape chart, a timeline or a board: a summary, the two or three commands people take there, and the way to the record's page. A peek never replaces the page for editing the whole record.
    • Master-detail workspace (WorkspacePage with master) when people work through a queue one item at a time and go straight to the next: bank lines to match, invoices to map. master holds the queue, usually a ResourceList whose currentId marks the open item (aria-current, the selected fill and a leading bar); body works on that item, and masterLabel names the queue region. The two sit side by side while the detail keeps at least 60% of the width and the 38rem a table needs, and wrap, master first, when it would not: the split follows the room the app navigation (and a docked Peek) leaves, not a viewport breakpoint. The master frames and scrolls itself; the page body's gap separates the two once. Each item keeps its own URL (?id= or a record route), so a link to one item still opens it inside the queue.

    Whichever presentation is chosen:

    • The collection keeps its state. Its filters, sort, page and search live in the URL; a record page's way back is a header action carrying the reader's returnTo, and a modal or peek closes onto the same scroll position, selection and board column.
    • A way back also keeps the reader's place: it names the row it left from. The row link's returnTo is the collection URL with #row=<id> (rowAnchorHref); on a plain click the collection calls rememberRowAnchor(link), which writes the same fragment and the row's screen position into the current history entry. On arrival it calls takeRowAnchor() (scroll restoration waits while the rows load), renders with FaifoTable's currentRow, and once the rows are on screen restoreRowAnchor(root, anchor) puts the row back where it stood through Back or the page's way back. rememberRowAnchor adds measured top and table left coordinates to a native record link's returnTo fragment; this needs no storage. An unmeasured shared link centres the row. Restoration focuses its link without scrolling again, unless focus is already inside that row (a modal returns focus to its opening action). It returns false when the row is no longer shown — the collection then says so instead of guessing. A new query clears the fragment.
    • The record is a client-side island on the shared record runtime. It owns loading, focus, tabs, unsaved-change prompts and completion feedback; the server renders the closed modal host or the page in its loading state, so the server and first client render stay identical.
    • Size follows content in a modal: a short record uses the default size, and only long content uses the large size with an internal scroll region.
    • A record with more than one tab passes height: 'fixed' to ModalSheet: the dialog holds the viewport cap (data-height="fixed") so switching between tabs of different heights never resizes it. TabbedView keeps the tab bar visible and only TabPanel scrolls. The panel deliberately owns no left or right padding; the containing modal supplies the horizontal inset. A single-view record and its nested dialogs keep height: 'content' (the default).
    • Full-page tabbed content uses TabbedView({ scroll: 'page', ... }). Its panel grows with its content and wheel/touch scrolling reaches the containing page, including when the pointer is over the panel. The default scroll: 'panel' remains for bounded record modals; only that panel scrolls. A standalone TabPanel accepts the same option. Do not add consumer overflow overrides.
    • A child action of the record (reassign, postpone, move a room, take a payment) opens as a nested dialog over the record, page or modal, not as another page.
    • Do not open a workspace record in a modal to keep the list visible, and do not send a short catalogue entry to a page of its own.

    #Record changes and client collections

    The shared KetSuite record runtime emits cancelable faifo:records-changed. A mounted paged collection claims the event in capture phase and refreshes its read, preserving list query and focus. The backend shell remains the fallback for server-rendered collections. Closing a record through its own history entry does not navigate the collection. See the host's record runtime contract.

    RecordForm.groups renders peer groups inside one native form and one save. Each group supplies a stable id, translated title, optional description and public FieldProps[]. fields remain the leading ungrouped fields (use an empty array for a fully grouped form). The form owns divided Stack/Section and FormGrid composition. The caller owns the working Surface, so groups add no nested frame or inset. Specimen: record-form-groups.

    RecordForm.submitDisabled disables only its visible submit button. Fields remain editable and validation feedback remains available, so a domain prerequisite does not turn the draft into a disabled form. The server must still validate that prerequisite. Specimen: record-form-submit-blocked.

    Record consumers preserve domain refusal messageKey alongside field/code. The Suite runtime translates the message key before the code, retaining a generic fallback when neither is known; field identity and focus remain unchanged. See the Suite record-modal documentation.

    #API

    Generated from the package source. A property without a description has none in the source yet.

    #createFaifoTableViewFunction

    function createFaifoTableView(props: FaifoTableIslandProps, extensions?: FaifoTableExtensions | undefined, server?: ServerRendering | undefined): IslandController
    ParameterType
    propsrequiredFaifoTableIslandProps
    extensionsFaifoTableExtensions
    serverServerRendering
    ReturnsIslandController

    #faifoTableFunction

    function faifoTable(props: IslandProps): IslandController
    ParameterType
    propsrequiredIslandProps
    ReturnsIslandController

    #FaifoTableComponent

    PropertyDescriptionTypeDefault
    columnsrequired–Array<Omit<FaifoTableColumn, 'format' | 'sortable'> & { cell: (row: Row) => JSXChild }>–
    layoutKeep column geometry stable across sorting, paging, grouping and loading.'auto' | 'fixed'–
    rowsrequired–readonly Row[]–
    idrequired–(row: Row) => string–
    rowNameWhat the row's checkbox calls it; without it, the leading column's plain value, then the id.(row: Row) => string–
    rowHref–(row: Row) => string–
    rowLink–boolean–
    rowLevelAn outline, as a financial statement has: the row's depth (0 at the top). The first cell's content indents one step per level; every row keeps the same columns.(row: Row) => number | null–
    rowEmphasisA row that heads the rows below it (group) or adds them up (total) reads stronger.(row: Row) => FaifoTableRowEmphasis | null–
    currentRowThe id of the row the reader came back to from its record page (see rowAnchorHref).string | null–
    busyA delayed collection refresh dims retained rows; the collection owns its announcement.boolean–
    loadingInitial read: non-interactive placeholders with the table's column/selection geometry.{ rows: number; lines?: Readonly<Record<string, 1 | 2>> }–
    caption–string | null–
    tools–JSXChild–
    responsive–'scroll' | 'stack'–
    maxBlockSizeCollection-owned viewport budget. The table owns scrolling and sticky headings.string | null–
    gutter–'compact'–
    selection–FaifoTableSelection–
    groups–readonly (Omit<FaifoTableGroup, 'rows' | 'children' | 'href'> & { href: string rows?: readonly Row[] children?: FaifoTableServerProps<Row>['groups'] })[]–
    selectionStateClient composition only: keep page-local selection outside a render-pure table.{ ids: readonly string[] anchor?: string | null onChange: (ids: string[], anchor: string | null) => void }–
    sort–FaifoTableSort | null–
    labelsrequired–FaifoTableLabels–

    #Types

    #FaifoTableRowEmphasis

    type FaifoTableRowEmphasis = 'group' | 'total'

    #FaifoTableServerProps

    Server-owned collection cells keep their semantic markup and exact values. URL navigation and native external-form controls require no island props. The same FaifoTable renderer and CSS serve both this surface and the island.

    The properties of FaifoTable, listed above.

    #FaifoTableCellFormat

    A cell's shape as data, not code — a column's format has to cross the island's server/browser props boundary as JSON (see IslandController), so unlike a plain SSR table there is no cell: (row) => JSX closure here. custom is the escape hatch for anything the other 7 kinds can't express.

    type FaifoTableCellFormat =
      | { kind: 'text'; field: string }
      | { kind: 'number'; field: string; minimumFractionDigits?: number; maximumFractionDigits?: number }
      | { kind: 'currency'; field: string; currency: string }
      | { kind: 'date'; field: string }
      | { kind: 'status'; field: string; tones: Record<string, { label: string; tone: Tone }> }
      | { kind: 'identifier'; field: string }
      | { kind: 'person'; field: string }
      | { kind: 'link'; field: string; hrefField: string }
      | { kind: 'custom'; field: string; renderer: string; options?: Record<string, unknown> }

    #FaifoTableColumn

    PropertyDescriptionTypeDefault
    keyrequired–string–
    labelrequired–string–
    formatrequired–FaifoTableCellFormat–
    align–'start' | 'end'–
    priority–'primary' | 'secondary' | 'tertiary'–
    width–'narrow' | 'medium' | 'wide'–
    wrapLet descriptive content wrap within a bounded text column; rows grow as needed.boolean–
    sortable–boolean–
    sortHrefNative URL-driven sorting; takes precedence over the RPC sort handler.string–
    sortLabel–string–
    sortDirection–'asc' | 'desc' | null–
    kindSemantic presentation hint for server-rendered custom cells.'text' | 'number' | 'currency' | 'date' | 'status' | 'identifier' | 'person' | 'media'–

    #FaifoTableConfig

    PropertyDescriptionTypeDefault
    columnsrequired–FaifoTableColumn[]–
    layoutFixed columns use narrow/medium/wide weights of 1/2/3, independent of row content.'auto' | 'fixed'–
    rowsrequiredFirst page, server-rendered — ignored once groupBy is non-empty.FaifoTableRow[]–
    totalrequired–number–
    idFieldrequired–string–
    locale–string–
    rowHrefTemplateA {id}-interpolated href, replacing a function-typed rowHref that couldn't cross the props boundary.string–
    groupByThe active group-by keys, in order — the array search-filter's active Group By facets already produce. Empty ⇒ a flat table.string[]–
    groupsThe server-rendered top level, when groupBy is non-empty.FaifoTableGroup[]–
    selection–FaifoTableSelection–
    managerOmit for URL-driven tables whose rows are supplied by the page route.FaifoTableManager–
    page–number–
    sort–FaifoTableSort | null–
    pagerFalse when the containing toolbar owns pagination.false | { prev?: string; next?: string }–
    labelsrequired–FaifoTableLabels–

    #FaifoTableExtensions

    type FaifoTableExtensions = Record<
      string,
      (value: unknown, row: FaifoTableRow, options: Record<string, unknown> | undefined) => TemplateResult
    >

    #FaifoTableGroup

    One group level's node. Reuses the same shape design-system's SSR TableGroup and a host's loadListGroups already return — children (subgroups) or rows (a leaf group's rows) are absent until that node is expanded and fetched, or until the caller pre-populates them statically (a manager-less demo can supply an already-open tree with no RPC needed).

    PropertyDescriptionTypeDefault
    idrequired–string–
    labelrequired–string–
    countrequired–number–
    children–FaifoTableGroup[]–
    rows–FaifoTableRow[]–
    offsetZero-based row offset for this leaf group's current page.number–
    openURL-driven trees explicitly carry their expansion state and next URL.boolean–
    href–string–
    pager–{ label: string; prev?: string; next?: string }–

    #FaifoTableLabels

    PropertyDescriptionTypeDefault
    region–string–
    selectAllrequired–string–
    selectRowrequired–string–
    sortedAscendingrequired–string–
    sortedDescendingrequired–string–
    previousPagerequired–string–
    nextPagerequired–string–
    loadingrequired–string–
    loadErrorrequired–string–
    retryrequired–string–
    emptyrequired–string–
    emptyHintrequired–string–

    #FaifoTableManager

    listFunction is the only RPC a sort or page change ever calls — over the same callApi//_ket/fn/ contract relation-select/search-filter already use. There is deliberately no countFunction here: listInput never changes from inside FaifoTable itself, so the row count it would recompute is always the one FaifoTableConfig.total already holds from the page's own initial render — the caller counts once, server-side, the same way it already builds that first page. groupFunction is only needed when FaifoTableConfig.groupBy is non-empty.

    PropertyDescriptionTypeDefault
    listFunctionrequired–string–
    groupFunction–string–
    listInput–Record<string, unknown>–
    pageSize–number–

    #FaifoTableRow

    type FaifoTableRow = Record<string, unknown>

    #FaifoTableSelection

    Targets an external form by id — e.g. a screen's existing bulk-action form. Each selected row becomes a hidden {fieldName}.{id} input targeting that form, the same "selected." convention a host application's bulk-action forms already parse — so a form built for that convention needs no change.

    PropertyDescriptionTypeDefault
    formIdrequired–string–
    fieldName–string–

    #FaifoTableSort

    PropertyDescriptionTypeDefault
    fieldrequired–string–
    directionrequired–'asc' | 'desc'–

    #Hooks

    The data-ui values these components render. Select them in tests and behaviour; their look belongs to the design system. See Contract.

    • faifo-table
    • ft-scroll
    • ft-selection-target
    • ft-grid
    • ft-colgroup
    • ft-placeholder
    • ft-select-col
    • ft-select-all
    • ft-col
    • ft-sort-button
    • ft-sort-icon
    • ft-row
    • ft-cell
    • ft-person
    • ft-select-cell
    • ft-row-select
    • ft-row-link
    • ft-group-row
    • ft-group-cell
    • ft-group-toggle
    • ft-group-indent
    • ft-group-count
    • ft-group-pager
    • ft-pager
    • ft-pager-label
    • ft-pager-button
    • ft-select-persisted
    • ft-caption
    • ft-tools