Components
AbbreviateNumberActionLinkAdaptiveCardAffixAuthorityCheckCalendarViewChartConfirmDialogContainerCustomFormatInputDataTableDebounceInputDoubleSidedImageEllipsisButtonGanttChartGrowShrinkValueIconTextImageGalleryLoadingMasonryMediaSkeletonNavToggleNumericInputOtpInputPasswordInputPatternInputRegionMapRichTextEditorSegmentItemOptionStickyFooterSyntaxHighlighterUsersAvatarGroup
DataTable
DataTable is often used table logic encapsulated component, it can save up some boilerplate setup from react-table & quick start with your async table data.
Basic
Name | Email |
|---|
10 / page
Checkable
Name | Email |
|---|
10 / page
Query
Name | Email |
|---|
10 / page
API
DataTable
| Prop | Description | Type | Default |
|---|---|---|---|
| columns | The core columns configuration object for the entire table | Array<Column> | [] |
| data | The data array that you want to display on the table | Array<any> | [] |
| loading | Wheter to display loading indicator on the table | boolean | false |
| onCheckBoxChange | Callback when row checkbox is changed, return a checkbox value & changed row data | (checked: boolean, row: any) => void | - |
| onIndeterminateCheckBoxChange | Callback when indeterminate checkbox is changed, return indeterminate checkbox value & all rows data | (checked: boolean, rows: any) => void | - |
| onPaginationChange | Callback when pagination changed | (pageIndex: number) => void | - |
| onSelectChange | Callback when page size selector changed | (pageSize: number) => void | - |
| onSort | Callback when any column of sorted changed, return sort order & sorted column identifier | (pageSize: {order: 'desc' | 'asc', key: string}) => void | - |
| pageSizes | Options of selectable page sizes | number[] | [10, 25, 50, 100] |
| skeletonAvatarColumns | Specify skeleton avatar display is which column when loading is true | number[] | - |
| skeletonAvatarProps | Props for skeleton avatar | AvatarProps | - |
| pagingData | Paging state of tthe table | {total: number, pageIndex: number, pageSize: number} | {total: 0, pageIndex: 1, pageSize: 10} |