Home / Function/ DataGridEmptyState() — supabase Function Reference

DataGridEmptyState() — supabase Function Reference

Architecture documentation for the DataGridEmptyState() function in data-grid-empty-state.tsx from the supabase codebase.

Entity Profile

Relationship Graph

Source Code

apps/design-system/registry/default/example/data-grid-empty-state.tsx lines 15–56

export default function DataGridEmptyState() {
  const columns: Column<{ id: string; name: string; email: string }>[] = [
    { key: 'name', name: 'Display name', minWidth: 200, resizable: true },
    { key: 'email', name: 'Email', minWidth: 250, resizable: true },
    { key: 'phone', name: 'Phone', minWidth: 150, resizable: true },
  ]

  const rows: { id: string; name: string; email: string }[] = []

  return (
    <div className="h-full w-full flex flex-col relative min-h-[400px] rounded-md border overflow-hidden">
      <DataGrid
        className="flex-grow border-t-0 bg-dash-canvas"
        rowHeight={44}
        headerRowHeight={36}
        columns={columns}
        rows={rows}
        rowKeyGetter={(row: { id: string; name: string; email: string }) => row.id}
        rowClass={() => {
          return cn(
            'bg-surface-200 cursor-pointer',
            '[&>.rdg-cell]:border-box [&>.rdg-cell]:outline-none [&>.rdg-cell]:shadow-none',
            '[&>.rdg-cell:first-child>div]:ml-8'
          )
        }}
        renderers={{
          noRowsFallback: (
            <div className="absolute top-20 px-6 flex flex-col items-center justify-center w-full gap-y-2">
              <Users className="text-foreground-lighter" strokeWidth={1} />
              <div className="text-center">
                <p className="text-foreground">No users in your project</p>
                <p className="text-foreground-light">
                  There are currently no users who signed up to your project
                </p>
              </div>
            </div>
          ),
        }}
      />
    </div>
  )
}

Domain

Subdomains

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free