Documents / @faasjs/ant-design / TableProps
Type Alias: TableProps<T, ExtendTypes>
TableProps<
T,ExtendTypes> =object&AntdTableProps<T>
Props for the FaasJS Ant Design Table component.
Type Declaration
extendTypes?
optionalextendTypes?:object
Custom type renderers keyed by item type.
Index Signature
[key: string]: ExtendTableTypeProps<any>
faasData?
optionalfaasData?:FaasDataWrapperProps<any>
Request config used to fetch table data before rendering.
A plain array response is rendered directly. A paginated list response should follow TableFaasDataResponse; that shape enables remote pagination, filter, and sorter reloads.
items
items: (
TableItemProps|ExtendTypes&ExtendTableItemProps)[]
Column definitions rendered by the table.
onChange?
optionalonChange?: (pagination,filters,sorter,extra) =>object
Change handler that can return rewritten pagination, filter, and sorter state.
When faasData uses a paginated list response, the returned state is sent
to reload(). Without this handler, the raw Ant Design table state is sent.
Parameters
pagination
TablePaginationConfig
filters
Record<string, FilterValue | null>
sorter
SorterResult<T> | SorterResult<T>[]
extra
TableCurrentDataSource<T>
Returns
object
extra
extra:
TableCurrentDataSource<T>
filters
filters:
Record<string,FilterValue|null>
pagination
pagination:
TablePaginationConfig
sorter
sorter:
SorterResult<T> |SorterResult<T>[]
Type Parameters
T
T = any
Row record type rendered by the table.
ExtendTypes
ExtendTypes = any
Additional item prop shape accepted by items.