Skip to main content

datatable

Server-side tables for Go + React. TanStack Table–aligned query parsing, filtering, sorting, and pagination — with a matching React UI for production list pages.

What you get​

LayerPackageRole
Gogithub.com/izetmolla/datatableColumn defs, URL → TableQuery, SQL helpers, GORM / raw PostgreSQL
Fiber…/adapters/fiberv3queryExtract table state from Fiber requests
ReactAdmin Console components/datatable<DataTable />, hooks, URL state (nuqs), React Query

One []Column slice is the source of truth: it validates inbound query params, maps SQL expressions, and is returned by GET …/columns so the frontend can build TanStack ColumnDefs.

Why it exists​

List pages usually reinvent the same contract:

  1. URL state for page / sort / filters
  2. Backend parsing into safe SQL
  3. Column metadata for the UI

datatable standardizes that contract on both sides so Go handlers and React pages stay in sync.

Feature highlights​

  • Column defs — sorting, filtering, visibility, pinning, async select options, editable cells
  • Query parsing — JSON + bracket params (pagination, sorting, columnFilters, advanced filters)
  • Operators — iLike, eq, inArray, date ranges, empty checks, join and / or, nested groups
  • PostgreSQL — Find (GORM) and FindRaw (dynamic SELECT + joins)
  • React — server or client mode, simple & advanced filter toolbars, row selection, action bars, cell editing

Install the React block (CLI)​

bunx shadcn@latest add https://raw.githubusercontent.com/izetmolla/datatable/main/registry/v1.json

Or: bunx shadcn@latest add izetmolla/datatable/datatable — see shadcn CLI.

Choose your path​

Author​

Izet Molla · pkg.go.dev · MIT License