ObjectStackObjectStack

View Metadata

Configure list views and form views — grid, kanban, calendar, gantt, and more

View Metadata

A View defines how records of an Object are displayed to users. ObjectStack supports two main view categories: List Views for browsing records and Form Views for editing individual records.

List View

A List View controls how a collection of records is presented. It supports multiple visualization types.

Basic Structure

const taskListView = {
  name: 'all_tasks',
  label: 'All Tasks',
  type: 'grid',
  data: {
    provider: 'object',
    object: 'task',
  },
  columns: [
    { field: 'title', label: 'Title', width: 300 },
    { field: 'status', label: 'Status', width: 120 },
    { field: 'assignee', label: 'Assignee', width: 200 },
    { field: 'due_date', label: 'Due Date', width: 150 },
  ],
  filter: [],
  sort: [{ field: 'created_at', direction: 'desc' }],
};

View Types

TypeDescriptionUse Case
gridTable/spreadsheet viewDefault record listing
kanbanCard board grouped by fieldStatus-based workflows
galleryCard grid with imagesVisual content browsing
calendarCalendar with date eventsScheduling and planning
timelineHorizontal timelineProject scheduling
ganttGantt chart with dependenciesProject management
mapGeographic map pinsLocation-based data

List View Properties

PropertyTypeRequiredDescription
namestringMachine name (snake_case)
labelstringDisplay label
typeenumView type (see table above)
dataViewDataData source configuration
columnsListColumn[]optionalColumn definitions
filterarrayoptionalFilter criteria
sortarrayoptionalSort configuration
quickFiltersQuickFilter[]optionalOne-click filter chips
searchableFieldsstring[]optionalFields included in search
filterableFieldsstring[]optionalFields available for filtering
groupingobjectoptionalRow grouping configuration
paginationobjectoptionalPagination settings
selectionobjectoptionalRow selection mode
navigationobjectoptionalRow click navigation
rowActionsarrayoptionalPer-row action buttons
bulkActionsarrayoptionalBulk selection actions
inlineEditbooleanoptionalEnable inline editing
exportOptionsobjectoptionalExport configuration

Column Configuration

columns: [
  {
    field: 'name',
    label: 'Account Name',
    width: 250,
    pinned: 'left',          // 'left' | 'right' — freeze column
    sortable: true,
    resizable: true,
    summary: {               // Column footer aggregation
      function: 'count',
    },
  },
  {
    field: 'annual_revenue',
    label: 'Revenue',
    width: 150,
    align: 'right',
    summary: {
      function: 'sum',
    },
  },
]
PropertyTypeDescription
fieldstringField name
labelstringDisplay header
widthnumberColumn width in pixels
hiddenbooleanHide column
pinned'left' | 'right'Freeze column position
sortablebooleanAllow column sorting
resizablebooleanAllow column resize
summaryobjectFooter aggregation (count, sum, avg, min, max)
linkstringMake cell a clickable link

Quick Filters

Pre-configured one-click filter chips displayed above the list:

quickFilters: [
  { field: 'status', label: 'Active', operator: 'eq', value: 'active' },
  { field: 'status', label: 'Closed', operator: 'eq', value: 'closed' },
  { field: 'owner', label: 'My Records', operator: 'eq', value: '{currentUser}' },
]

Data Source

Views can load data from three sources:

// From an Object (most common)
data: { provider: 'object', object: 'task' }

// From an external API
data: {
  provider: 'api',
  read: { url: '/api/external/tasks', method: 'GET' },
}

// Static values
data: {
  provider: 'value',
  items: [{ id: '1', name: 'Item 1' }],
}

Type-Specific Configuration

Kanban

type: 'kanban',
kanban: {
  groupByField: 'status',
  titleField: 'title',
  colorField: 'priority',
}

Calendar

type: 'calendar',
calendar: {
  startDateField: 'start_date',
  endDateField: 'end_date',
  titleField: 'title',
  colorField: 'status',
}

Gantt

type: 'gantt',
gantt: {
  startDateField: 'start_date',
  endDateField: 'end_date',
  titleField: 'title',
  progressField: 'percent_complete',
  dependenciesField: 'depends_on',
}

Form View

A Form View defines how a single record is displayed for viewing or editing.

Basic Structure

const taskFormView = {
  type: 'simple',
  data: { provider: 'object', object: 'task' },
  sections: [
    {
      label: 'Basic Information',
      columns: 2,
      fields: [
        { field: 'title', colSpan: 2 },
        { field: 'status' },
        { field: 'priority' },
        { field: 'assignee' },
        { field: 'due_date' },
      ],
    },
    {
      label: 'Details',
      collapsible: true,
      columns: 1,
      fields: [
        { field: 'description', colSpan: 1 },
      ],
    },
  ],
};

Form Types

TypeDescription
simpleSingle-page form
tabbedForm with tab navigation
wizardMulti-step wizard
splitSplit-pane layout
drawerSide drawer form
modalModal dialog form

Section Configuration

PropertyTypeDescription
labelstringSection header
columns1-4Grid column count
collapsiblebooleanCan section be collapsed
collapsedbooleanInitially collapsed
fieldsFormField[]Fields in the section

Form Field Configuration

Each field in a form section can be customized:

fields: [
  {
    field: 'title',
    label: 'Task Title',        // Override field label
    placeholder: 'Enter title',
    helpText: 'A brief description of the task',
    required: true,              // Override required
    colSpan: 2,                  // Span 2 grid columns
    widget: 'custom-editor',     // Custom widget component
    visibleOn: "status != 'cancelled'",
  },
]
PropertyTypeDescription
fieldstringField name
labelstringDisplay label override
placeholderstringPlaceholder text
helpTextstringHelp/hint text
readonlybooleanRead-only override
requiredbooleanRequired override
hiddenbooleanHidden override
colSpan1-4Column span in grid layout
widgetstringCustom widget/component name
dependsOnstringParent field for cascading
visibleOnstringVisibility condition expression
// Sort related records
defaultSort: [
  { field: 'created_at', direction: 'desc' },
]

Complete Example

// List view: Kanban board for tasks
const taskKanban = {
  name: 'task_board',
  label: 'Task Board',
  type: 'kanban',
  data: { provider: 'object', object: 'task' },
  kanban: {
    groupByField: 'status',
    titleField: 'title',
  },
  columns: [
    { field: 'title', label: 'Title' },
    { field: 'assignee', label: 'Assignee' },
    { field: 'priority', label: 'Priority' },
    { field: 'due_date', label: 'Due Date' },
  ],
  quickFilters: [
    { field: 'assignee', label: 'My Tasks', operator: 'eq', value: '{currentUser}' },
  ],
  sort: [{ field: 'priority', direction: 'desc' }],
};

// Form view: Task edit form
const taskForm = {
  type: 'tabbed',
  data: { provider: 'object', object: 'task' },
  sections: [
    {
      label: 'Details',
      columns: 2,
      fields: [
        { field: 'title', colSpan: 2, required: true },
        { field: 'status' },
        { field: 'priority' },
        { field: 'assignee' },
        { field: 'due_date' },
        { field: 'description', colSpan: 2 },
      ],
    },
    {
      label: 'System',
      collapsible: true,
      collapsed: true,
      columns: 2,
      fields: [
        { field: 'created_at', readonly: true },
        { field: 'updated_at', readonly: true },
      ],
    },
  ],
};

On this page