Created
July 8, 2022 11:23
-
-
Save dipeshhkc/432b182d84ae5fce5a72299b873564a2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const memberColumns = useMemo(() => { | |
return [ | |
{ | |
Header: "Domain Name", | |
accessor: "name", | |
}, | |
{ | |
Header: "# of Records", | |
accessor: "number_of_records", | |
Cell: ({ value }) => { | |
return <span>{value} records</span>; | |
}, | |
} | |
]},[]) | |
<Datatable | |
columns={memberColumns} | |
data={data_from_api} | |
//when clicking on each row | |
rowClick={(row) => { | |
navigate( | |
`/detail/${row?.["id"]}/view` | |
); | |
}} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment