Skip to content

Commit

Permalink
feat: update table add searching
Browse files Browse the repository at this point in the history
  • Loading branch information
Salihu Abdullahi authored and Salihu Abdullahi committed Dec 6, 2019
1 parent fe7fe4a commit 4015e13
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 107 deletions.
13 changes: 7 additions & 6 deletions develop/components/pages/TablePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const TablePage: React.FunctionComponent = () => {
() => [
{
Header: "id",
accessor: "Id"
accessor: "id",
canSort: false
},
{
Header: "First Name",
Expand All @@ -39,14 +40,14 @@ const TablePage: React.FunctionComponent = () => {
Header: "Visits",
accessor: "visits",
},
{
Header: "Status",
accessor: "status",
},
{
Header: "Profile Progress",
accessor: "progress",
},
{
Header: "Status",
accessor: "status",
},
],
[]
);
Expand All @@ -70,12 +71,12 @@ const TablePage: React.FunctionComponent = () => {
columns={columns}
data={data}
sortable={true}
useGroupBy={true}
setSelectAllValue={selectAll}
offsett={pageSize}
currentpage={paginationValue}
usePagination={true}
useRowSelection={true}
onSort={(rows: Array<TableRow>, columnsOrg: Array<Column>) => { console.log(columnsOrg); }}
onRowSelection={(e: React.ChangeEvent<HTMLInputElement>, rows: Array<TableRow>) => { console.log(rows); setSelectedRow(rows); }}
onRowExpanded={(expandedRowsIndexes: Array<string>) => { console.log("the expanded ros are ", expandedRowsIndexes); }}
footer={
Expand Down
Loading

0 comments on commit 4015e13

Please sign in to comment.