diff --git a/src/App.js b/src/App.js index 50cd5af..26864c1 100644 --- a/src/App.js +++ b/src/App.js @@ -58,6 +58,7 @@ import UploadFile from "./components/UploadFile"; import BarChartApex from "./components/BarChartApex"; import SemiDonut from "./components/SemiDonut"; import FolderTree from "./components/FolderTree"; +import GridListTable from "./components/GridListTable"; // import Digikala from "./components/Digikala/ImageSlider"; @@ -88,7 +89,7 @@ function App() { {/* */} {/* */} {/* */} - + {/* */} {/* */} {/* */} {/* */} @@ -103,7 +104,7 @@ function App() { {/* */} {/* */} {/* */} - + {/* */} {/* */} {/*
@@ -123,8 +124,10 @@ function App() { {/* */} {/* */} {/* */} - - + {/* */} + + + {/* */}
); diff --git a/src/components/FolderTree/index.js b/src/components/FolderTree/index.js index 75c4780..60e16dd 100644 --- a/src/components/FolderTree/index.js +++ b/src/components/FolderTree/index.js @@ -10,7 +10,7 @@ const FolderTree = ({ items }) => { const [activeDropdown, setActiveDropdown] = useState(null); return ( -
+
{items.map((item, index) => (
{/* level1 */} diff --git a/src/components/GridListTable/index.js b/src/components/GridListTable/index.js new file mode 100644 index 0000000..6d78553 --- /dev/null +++ b/src/components/GridListTable/index.js @@ -0,0 +1,20 @@ +import React from "react"; +import FolderTree from "../FolderTree"; +import ReactTable5 from "../ReactTable5"; + +const GridListTable = () => { + return ( +
+ {/* right */} +
+ +
+ {/* left */} +
+ +
+
+ ); +}; + +export default GridListTable; diff --git a/src/components/ReactTable5/BasicTable.js b/src/components/ReactTable5/BasicTable.js index 6f51252..1a0d683 100644 --- a/src/components/ReactTable5/BasicTable.js +++ b/src/components/ReactTable5/BasicTable.js @@ -113,6 +113,10 @@ const BasicTable = ({ [] ); + // console.log("mahdi tannaz"); + // console.log(columns[0]); + // console.log("mahdi tannaz"); + const defaultColumn = useMemo(() => { return {}; }, []); @@ -163,7 +167,7 @@ const BasicTable = ({ const [activeList, setActiveList] = useState(false); return ( -
+
{/* {filtering &&
TANNAZ
} */} {/*
{listView.map((list, i) => ( @@ -175,39 +179,41 @@ const BasicTable = ({ /> ))}
{" "} */} -
+
{/* select View list */} -
- setActiveList(false)} - /> - setActiveList(true)} +
+
+ setActiveList(false)} + /> + setActiveList(true)} + /> +
+ {headerGroups.map((headerGroup) => + headerGroup.headers.map((column) => + column.Filter ? ( +
+ {column.render("Filter")} +
+ ) : null + ) + )} +
- {headerGroups.map((headerGroup) => - headerGroup.headers.map((column) => - column.Filter ? ( -
- {column.render("Filter")} -
- ) : null - ) - )} - -
+
@@ -282,7 +288,7 @@ const BasicTable = ({ {/* table LIST */} {activeTab == 0 ? ( <> - {activeList === false && ( + {activeList === true && ( // table {row.cells.map((cell, index) => { - // console.log(row.cells); + console.log(row.cells); return ( ) : null} @@ -381,7 +387,7 @@ const BasicTable = ({
- {/* {console.log(row.original)} */} + {console.log(row.original)}
)} {/* GRID LIST */} - {activeList === true && ( + {activeList === false && (
+ {/* {console.log(row.values)} */} +
{row.original.Checkbox}
{row.original.filePic} [ { - Header: "چک باکس", + Header: "checkBox", + // accessor: "checkBox", accessor: () => Checkbox({ setFiltering, filtering, addTab }), className: "w-7", }, diff --git a/src/components/ReactTable5/index.js b/src/components/ReactTable5/index.js index 99c0aec..67c71ef 100644 --- a/src/components/ReactTable5/index.js +++ b/src/components/ReactTable5/index.js @@ -32,7 +32,7 @@ const ReactTable5 = ({ breadCrumbs, breadCrumb }) => { }; return ( -
+
{/* breadCrumb */}
{breadCrumb && @@ -57,7 +57,7 @@ const ReactTable5 = ({ breadCrumbs, breadCrumb }) => {
))}
-
+