Skip to main content

Introducing Workflow Engine, try for FREE workflowengine.io.

Table / Data grid

Introduction

The Table component allows users to easily create and manage tables in their applications. It provides a flexible and customizable interface that can be adapted to different needs. Using Table, you can create tables with any number of rows and columns. This component is based on Table component. This component is included within the following NPM package: @react-form-builder/components-rsuite-table.

The table consists of several types of components:

  • Column is used to display a single column of the table.
  • Column group is used to group columns.
  • Header cell is used to display the header of a table cell.
  • Cell displays the contents of the column.

Using Table component

The table component differs from many other components in that it has an array of objects as a value. By default, the column headings and cell values are displayed in text. But you can use components to change the display of a cell. Let's turn to the examples of tables to visually show how the table works.

Basic

Appearance

Loading

Table height

Custom cell

Resizable

Fluid

Sort

Colspan

Rowspan

Summary

Show full text of cells

Word wrap

Properties of table components

Table main properties

NameTypeDescription
Affix headerbooleanAffix the table header to the specified location on the page
Affix horizontal scrollbarbooleanAffix the table horizontal scrollbar to the specified position on the page
Auto heightbooleanThe height of the table will be automatically expanded according to the number of data rows, and no vertical scroll bar will appear
BorderedbooleanShow border
Cell borderedbooleanShow cell border
DataarrayTable data
Default sort typechoiceSort type, Asc, Desc
Fill heightbooleanForce the height of the table to be equal to the height of its parent container. Cannot be used together with Auto height
Header heightnumberTable header height
HeightnumberTable height
HoverbooleanThe row of the table has a mouseover effect
LoadingbooleanShow loading
Max heightnumberMaximum heigh
Min heightnumberMinimum height
Row class namestringAdd an optional extra class name to row
Row heightnumberRow height
Row keystringEach row corresponds to the unique key in data
Should update scrollbooleanWhether to update the scroll after the table size is updated
Show headerbooleanDisplay header
Sort columnstringSort column name
Sort typechoiceSort type, Asc, Desc
VirtualizedbooleanEffectively render large tabular data
WidthnumberTable width
Word wrapchoiceWhether to appear line breaks where text overflows its content box, Break All, _Break Word or Keep All

Column main properties

NameTypeDescription
AlignchoiceAlignment, left, center, or right
Col spannumberMerges column cells to merge when the Data key value for the merged column is null or undefined
FixedbooleanFixed column
Flex grownumberSet the column width automatically adjusts, when set Flex grow cannot set Resizable and Width property
Full textbooleanWhether to display the full text of the cell content when the mouse is hovered
Min widthnumberWhen you use Flex grow, you can set a minimum width
ResizablebooleanCustomizable resize column width
Row spanfunctionMerges rows on the specified column
SortablebooleanSortable
Vertical alignbooleanVertical alignment, top, middle or bottom
WidthnumberColumn width

Column group main properties

NameTypeDescription
AlignchoiceAlignment, left, center, or right
FixedbooleanFixed column group
Group header heightnumberThe height of the header of the merged cell group
HeaderstringGroup header
Vertical alignstringVertical alignment, top, middle or bottom

Header cell main properties

NameTypeDescription
ContentstringTable column header

Cell main properties

NameTypeDescription
Data keystringData binding key, but also a sort of key