Back to Nocobase

Table

docs/docs/en/shared-components/table/index.md

2.1.21985 B
Original Source

Table

Table is used to display lists, select rows, and drag-sort rows on settings pages.

It is based on Antd Table and adds row selection and drag sorting for settings pages.

Basic Usage

tsx

API

PropTypeDescription
rowKey`string(record, index) => React.Key`
showIndexbooleanShow row index before selection
isDraggablebooleanWhether drag sorting is enabled
onSortEnd`(from, to) => voidPromise<void>`
showSortHandlebooleanWhether to show the default drag handle
sortHandleColumnWidthnumberWidth of the automatic drag-handle column

Attached exports

DescriptionDescription
DEFAULT_PAGE_SIZE50
PAGE_SIZE_OPTIONS[5, 10, 20, 50, 100, 200]