master
mahdi andalib 3 years ago
parent da09fab25a
commit a0871366cd
  1. 19
      src/components/ReactTable5/BasicTable.js

@ -153,8 +153,16 @@ const BasicTable = ({
return (
<>
<img src={list} className="cursor-pointer my-5" />
<img src={grid} className="cursor-pointer my-5" />
<img
src={list}
className="cursor-pointer my-5"
onClick={() => setActiveList(false)}
/>
<img
src={grid}
className="cursor-pointer my-5"
onClick={() => setActiveList(true)}
/>
<div className="flex flex-row items-center justify-between">
{/* right box */}
<di className="bg-red-400">
@ -217,6 +225,7 @@ const BasicTable = ({
</div>
) : null}
</div>
{/* table LIST */}
{activeTab == 0 ? (
<>
@ -285,7 +294,7 @@ const BasicTable = ({
//
>
{row.cells.map((cell, index) => {
console.log(row.cells);
// console.log(row.cells);
return (
<td
{...cell.getCellProps({
@ -323,7 +332,7 @@ const BasicTable = ({
addTab={addTab}
row={row.original}
/>
{console.log(row.original)}
{/* {console.log(row.original)} */}
</td>
</tr>
) : null}
@ -350,6 +359,7 @@ const BasicTable = ({
/>
)}
{/* GRID LIST */}
{activeList === true && (
<div className="flex flex-row gap-4">
{data.map((item, index) => (
<div
@ -365,6 +375,7 @@ const BasicTable = ({
</div>
))}
</div>
)}
</>
);
};

Loading…
Cancel
Save