Leave Yamada UI a star

Star
Yamada UIYamada UIv1.6.4

PagingTable

PagingTable is a table component with pagination functionality.

Source@yamada-ui/table

Props

PagingTableProps

columns

Required

Description

The array of column defs to use for the table.

Type

Column<Y, any>[]

cellProps

Description

Props for table cell component.

Type

CellProps<Y>

checkboxProps

Description

Props for table checkbox element.

Type

CheckboxProps<string>

colorScheme

Description

The visual color appearance of the component.

Type

"blackAlpha" | "whiteAlpha" | "amber" | "blue" | "info" | "link" | "primary" | "cyan" | "emerald" | "flashy" | "fuchsia" | "gray" | "green" | "success" | "indigo" | "lime" | "neutral" | "orange" | "warning" | "pink" | "purple" | "red" | "danger" | "rose" | "sky" | "teal" | "violet" | "secondary" | "yellow"

Default

"gray"

containerProps

Description

Props for table container element.

Type

HTMLUIProps

defaultColumn

Description

Default column options to use for all column defs supplied to the table.

Type

Partial<Column<Y, any>>

defaultPageIndex

Description

The initial page index of the paging table.

Type

number

Default

0

defaultPageSize

Description

The initial page size of the paging table.

Type

number

Default

20

defaultSelectedRowIds

Description

The initial ids of the selected row.

Type

string[]

defaultSort

Description

The initial sort of the table.

Type

Sort<Y>

disabledRowIds

Description

The ids that disabled in selection.

Type

string[]

footerGroupProps

Description

Props for table footer group component.

Type

HeaderGroupProps<Y>

footerProps

Description

Props for table footer component.

Type

HeaderProps<Y>

formatPageSizeLabel

Description

Function to format the label used for the options in a select.

Type

(pageSize: number) => string

headerGroupProps

Description

Props for table header group component.

Type

HeaderGroupProps<Y>

headerProps

Description

Props for table header component.

Type

HeaderProps<Y>

highlightOnHover

Description

If true, highlight the row when the table row is hovered.

Type

boolean

Default

false

highlightOnSelected

Description

If true, highlight the row when the table row is selected.

Type

boolean

Default

false

isFocusable

Description

If true, the table cell will be focusable.

Type

boolean

Default

true

layout

Description

The CSS table-layout property.

Type

"auto" | "fixed" | "-moz-initial" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | [TableLayout | { [x: string]: TableLayout | undefined; ... 5 more ...; xl?: TableLayout | undefined; }, TableLayout | { ...; }] | { ...; } | [...] | { ...; } | ((theme: StyledTheme) => UIValue<...>)

onChangePageIndex

Description

The callback invoked when page index is changed.

Type

(pageIndex: number) => void

onChangePageSize

Description

The callback invoked when page size is changed.

Type

(pageIndex: number) => void

onChangeSelect

Description

The callback invoked when row is selected.

Type

(rowSelection: string[]) => void

onChangeSort

Description

The callback invoked when table sort is changed.

Type

(sort: Sort<Y>) => void

onClickRow

Description

The callback invoked when a row is clicked.

Type

(row: Row<Y>) => void

onDoubleClickRow

Description

The callback invoked when a row is double clicked.

Type

(row: Row<Y>) => void

pageIndex

Description

The page index of the paging table.

Type

number

pageSize

Description

The page size of the paging table.

Type

number

pageSizeList

Description

The list of the page size.

Type

number[]

Default

'[20, 50, 100]'

paginationProps

Description

Props for pagination element.

Type

Omit<PaginationProps, "page" | "onChange" | "defaultPage" | "total">

pagingControlProps

Description

Props for paging control element.

Type

HTMLUIProps

rowHeader

Description

The role used for the row header. This is used for accessibility to announce the selected row.

Type

keyof Y

rowId

Description

The id used to store the value when selected.

Type

keyof Y

rowProps

Description

Props for table row component.

Type

RowProps<Y>

rowsClickSelect

Description

If true, allows selection by clicking on a row.

Type

boolean

Default

false

selectColumnProps

Description

Props for table select column component.

Type

false | SelectColumn<Y, any>

selectedRowIds

Description

The ids of the selected row.

Type

string[]

selectProps

Description

Props for select element.

Type

Omit<SelectProps, | "children" | "defaultValue" | "onChange" | "data" | "value" | "placeholderInOptions">

size

Description

The size of the PagingTable.

Type

"sm" | "md" | "lg" | "xl"

Default

"md"

sort

Description

The sort of the table.

Type

Sort<Y>

sortIconProps

Description

Props for table sort icon element.

Type

IconProps

tbodyProps

Description

Props for table tbody element.

Type

TableBodyProps

tfootProps

Description

Props for table tfoot element.

Type

TableFootProps

theadProps

Description

Props for table thead element.

Type

TableHeadProps

variant

Description

The variant of the PagingTable.

Type

"simple" | "striped" | "unstyled"

Default

"simple"

withBorder

Description

If true, display the outer border of the table.

Type

boolean

Default

false

withColumnBorders

Description

If true, display line on the columns of the table.

Type

boolean

Default

false

withFooter

Description

If true, display the table footer.

Type

boolean

Default

false

withFooterSelect

Description

If true, display the checkbox in table footer.

Type

boolean

Default

false

withPagingControl

Description

If true, display the paging control.

Type

boolean

Default

true

Edit this page on GitHub

PreviousTableNextNativeTable