Views

A view determines how a table is presented to users. It can hide or reorder fields, filter, sort, and group records, and it holds the configuration that a view type requires to render as a grid, kanban board, calendar, gantt chart, or gallery.

View snapshot

PropertyTypeDescription
idstringView ID.
tableIdstringID of the owning table.
namestringView name.
typeBaseViewTypegrid, kanban, calendar, gantt, gallery, pivot.
fieldOrder?string[]Field order in this view.
fieldSettings?Record\<string, IViewFieldSetting\>Visibility, width, and card settings per field.
filter?`IFilterConfignull`
sort?ISortConfig[]Sort rules.
group?IGroupConfig[]Group rules.
configViewSpecificConfigConfiguration specific to the view type.

View types

TypeUse case
gridSpreadsheet-style editing of a table.
kanbanCards grouped by a select, person, group, text, or date field.
calendarRecords placed by date fields.
ganttTimeline planning with start and end date fields, planned-schedule comparison, completion, and predecessors.
galleryCard layout for records that are primarily visual or contain a large amount of content.
pivotSummaries and charts through the dashboard plugin.

Gantt configuration uses startDateFieldId and endDateFieldId for the current schedule and progressFieldId for completion. IBaseGanttViewConfig extends the Gantt configuration with showPlanComparison, planStartDateFieldId, planEndDateFieldId, planColor, and remainingColor. Set dependencyFieldId to a multi-value Record Link field to track predecessors. workingDaysOnly and workingDays control the work calendar.

Create a view

TypeScript
const view = table.createView('Kanban', univerAPI.Enum.BaseViewType.Kanban)

Configure filtering and sorting

TypeScript
view.setFilter({  conjunction: univerAPI.Enum.BaseFilterConjunction.AND,  conditions: [    {      fieldId: 'status',      operator: univerAPI.Enum.BaseFilterOperator.IS,      operand: 'In progress',    },  ],})view.setSort([  { fieldId: 'dueDate', direction: univerAPI.Enum.BaseSortDirection.ASC },])

Field visibility and width

TypeScript
view.setFieldVisible('internalNotes', false)view.setFieldWidth('title', 280)

How is this guide?

© 2026 DreamNum Co., Ltd.