diff --git a/src/components/ReactTable5/BasicTable.js b/src/components/ReactTable5/BasicTable.js index 66a0971..9022fa7 100644 --- a/src/components/ReactTable5/BasicTable.js +++ b/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 }) => ( + + ), + Cell: ({ row }) => ( + + ), + }, + ...columns, + ]; + }); + } ); const { globalFilter, pageIndex, pageSize } = state; @@ -260,6 +277,7 @@ const BasicTable = ({ // > {row.cells.map((cell, index) => { + console.log(row.cells); return (