Table component
A Table component
Install
npm i @wethecurious/wtc-ui-library
Usage
Import it into your project
import { Table } from '@wethecurious/wtc-ui-library'
<Table
fetchData={requestData}
columns={columns}
defaultPageSize={30}
showPagination={false}
loadOnScrollOffset={100}
isLoadOnScroll={true}
onDataFetch={action('Data Fetched')}
/>
Props
Prop | Description | Default |
---|---|---|
data | Table Data | |
defaultPageSize | Number of entries per page | 10 |
columns | Column data | |
theme | Theme | |
isFilterable | isFilterable | true |
showPagination | Show Pagination | true |
isSortable | Table is Sortable | true |
fetchData | Fetch data function | |
isRowSelectable | Table row is selectable | |
isCellSelectable | Table cell is selectable | |
onRowSelect | onRowSelect handler | |
onCellSelect | onCellSelect handler | |
onDataFetch | onDataFetch callback | |
loadOnScrollOffset | loadOnScrollOffset | |
isLoadOnScroll | isLoadOnScroll |