master
mahdi andalib 3 years ago
parent 3885ef5f9a
commit 029a21f316
  1. 2
      src/App.js
  2. 35
      src/components/ReactTable5/BasicTable.js

@ -101,7 +101,7 @@ function App() {
{/* <TableDesign1 /> */} {/* <TableDesign1 /> */}
{/* <ReactTable2 /> */} {/* <ReactTable2 /> */}
{/* <ReactTable3 /> */} {/* <ReactTable3 /> */}
{/* <ReactTable4 /> */} <ReactTable4 />
<ReactTable5 /> <ReactTable5 />
{/* <Digikala /> */} {/* <Digikala /> */}
{/* <HeaderDesign1 /> {/* <HeaderDesign1 />

@ -242,6 +242,7 @@ const BasicTable = ({
{/* table LIST */} {/* table LIST */}
{activeTab == 0 ? ( {activeTab == 0 ? (
<> <>
{activeList === false && (
<table <table
{...getTableProps()} {...getTableProps()}
className="min-w-full divide-y divide-gray-200 mb-5" className="min-w-full divide-y divide-gray-200 mb-5"
@ -354,23 +355,8 @@ const BasicTable = ({
})} })}
</tbody> </tbody>
</table> </table>
{/* bottom table */}
<GoToPage
pageIndex={pageIndex}
gotoPage={gotoPage}
pageOptions={pageOptions}
/>
<ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} />
</>
) : (
<EditRow
row={
rows.find((e) => e.original && +e.original.id === activeTab)
?.original || {}
}
columns={defaultColumn}
/>
)} )}
{/* GRID LIST */} {/* GRID LIST */}
{activeList === true && ( {activeList === true && (
<div className="flex flex-row gap-4"> <div className="flex flex-row gap-4">
@ -389,6 +375,23 @@ const BasicTable = ({
))} ))}
</div> </div>
)} )}
{/* bottom table */}
<GoToPage
pageIndex={pageIndex}
gotoPage={gotoPage}
pageOptions={pageOptions}
/>
<ShowMoreRows pageSize={pageSize} setPageSize={setPageSize} />
</>
) : (
<EditRow
row={
rows.find((e) => e.original && +e.original.id === activeTab)
?.original || {}
}
columns={defaultColumn}
/>
)}
</> </>
); );
}; };

Loading…
Cancel
Save