master
mahdi andalib 3 years ago
parent ac932ee804
commit bbb8aef84f
  1. 21
      src/components/ReactTable5/BasicTable.js

@ -123,7 +123,24 @@ const BasicTable = ({
useSortBy,
useExpanded,
usePagination,
useRowSelect
useRowSelect,
(hooks) => {
hooks.visibleColumns.push((columns) => {
return [
{
id: "selection",
className: "w-7",
Header: ({ getToggleAllRowsSelectedProps }) => (
<Checkbox {...getToggleAllRowsSelectedProps()} />
),
Cell: ({ row }) => (
<Checkbox {...row.getToggleRowSelectedProps()} />
),
},
...columns,
];
});
}
);
const { globalFilter, pageIndex, pageSize } = state;
@ -260,6 +277,7 @@ const BasicTable = ({
//
>
{row.cells.map((cell, index) => {
console.log(row.cells);
return (
<td
{...cell.getCellProps({
@ -271,6 +289,7 @@ const BasicTable = ({
fontSize: "13px",
textAlign: "right",
whiteSpace: "nowrap",
// backgroundColor: row.cells[0] ? "red" : "blue",
}}
key={index}
{...cell.getCellProps()}

Loading…
Cancel
Save