@logo-rn/logo-data-table
v0.2.8
Published
<LogoDataTable /> returns list object. Each item of the list must have a unique id, title, boolean checked value. Icon in not required.
Downloads
5
Readme
@logo-rn/logo-data-table
returns list object. Each item of the list must have a unique id, title, boolean checked value. Icon in not required.
Installation
Install the component:
npm i @logo-rn/logo-data-table -s
Usage
Once installed, import the component in your application:
import {LogoDataTable} from '@logo-rn/logo-data-table';
const [list, setList] = useState(LIST_ITEMS)
//..
<LogoDataTable list={list} onClick={(list: ListProps) => setList(list)} />
const [page, setPage] = useState(1)
const [numberOfItemsPerPage, setNumberOfItemsPerPage] = useState(5)
//...
<LogoPager
page={page}
numberOfPage={5}
numberOfItemsPerPage={numberOfItemsPerPage}
onItemsPerPageChange={(item: number) => setNumberOfItemsPerPage(item)}
onChangePage={(newPage: number) => setPage(newPage)}
numberOfItems={23} />