master
mahdi andalib 3 years ago
parent 666f3cdaf4
commit 3885ef5f9a
  1. 2
      src/App.js
  2. 24
      src/components/ReactTable5/BasicTable.js

@ -82,7 +82,7 @@ function App() {
{/* <Testttt /> */} {/* <Testttt /> */}
{/* <Design2D /> */} {/* <Design2D /> */}
{/* <Features /> */} {/* <Features /> */}
<Feedback /> {/* <Feedback /> */}
{/* <Alert /> */} {/* <Alert /> */}
{/* <Toast /> */} {/* <Toast /> */}
{/* <ProductSuggestion /> */} {/* <ProductSuggestion /> */}

@ -36,6 +36,7 @@ import {
const BasicTable = ({ const BasicTable = ({
settingsIcon, settingsIcon,
thead, thead,
listView,
addTab, addTab,
tabs, tabs,
delTab, delTab,
@ -149,10 +150,20 @@ const BasicTable = ({
const { globalFilter, pageIndex, pageSize } = state; const { globalFilter, pageIndex, pageSize } = state;
const [activeList, setActiveList] = useState(null); const [activeList, setActiveList] = useState(false);
return ( return (
<> <>
{/* <div className="flex flex-row items-center">
{listView.map((list, i) => (
<img
keep={i}
src={list.icon}
className="cursor-pointer mx-2"
onClick={() => setActiveList(false)}
/>
))}
</div>{" "} */}
<img <img
src={list} src={list}
className="cursor-pointer my-5" className="cursor-pointer my-5"
@ -226,6 +237,8 @@ const BasicTable = ({
) : null} ) : null}
</div> </div>
{activeList === true ? <div>listView</div> : <div>gridView</div>}
{/* table LIST */} {/* table LIST */}
{activeTab == 0 ? ( {activeTab == 0 ? (
<> <>
@ -386,4 +399,13 @@ BasicTable.defaultProps = {
settingsIcon: true, settingsIcon: true,
thead: false, thead: false,
listView: [
{
icon: list,
},
{
icon: grid,
},
],
}; };

Loading…
Cancel
Save