diff --git a/src/components/ReactTable4/BasicTable.js b/src/components/ReactTable4/BasicTable.js index 272a0bd..5b97a97 100644 --- a/src/components/ReactTable4/BasicTable.js +++ b/src/components/ReactTable4/BasicTable.js @@ -2,6 +2,7 @@ import React, { useMemo, useState } from "react"; import "./index.scss"; import { ColumnSearch } from "./ColumnSearch.js"; +import { ToggleColumns } from "./ToggleColumns.js"; import { Tabbar } from "./index"; import { @@ -29,9 +30,6 @@ const BasicTable = ({ settingsIcon }) => { const columns = React.useMemo(() => COLUMNS, []); const data = useMemo(() => MOCK_DATA, []); - //selected row - // const [selectedFilterRow, setSelectedFilterRow] = useState(null); - const defaultColumn = useMemo(() => { return { Filter: ColumnSearch, @@ -95,42 +93,14 @@ const BasicTable = ({ settingsIcon }) => { } ); - // const changeOrder = () => { - // setColumnOrder([ - // "name", - // "order-number", - // "user-job", - // "order-level", - // "order-status", - // "order-price", - // ]); - // }; - const { globalFilter, pageIndex, pageSize } = state; return ( <> - {/* */} {/* toggle columns */} - {/*
-
- Toggle All -
- {allColumns.map((column) => ( -
- -
- ))} -
*/} - {/* Change Column Order */} - {/* */} +
{/* right box */}
@@ -280,13 +250,6 @@ const BasicTable = ({ settingsIcon }) => {
- {/* - صفحه{" "} - - {pageIndex + 1} از {pageOptions.length} - - {""} - */} صفحه{" "} @@ -306,7 +269,6 @@ const BasicTable = ({ settingsIcon }) => { {""} - Toggle All +
+ {allColumns.map((column) => ( +
+ +
+ ))} +
+ ); +}; + +export default ToggleColumns; diff --git a/src/components/ReactTable4/index.js b/src/components/ReactTable4/index.js index 425707b..6822d06 100644 --- a/src/components/ReactTable4/index.js +++ b/src/components/ReactTable4/index.js @@ -6,7 +6,7 @@ import cancleIcon from "./zarbedar-icon.svg"; const ReactTable4 = ({ breadCrumbs, subTitle, title }) => { return ( -
+
{/* breadCrumb */}
{breadCrumbs.map((breadCrumb, index) => ( @@ -54,42 +54,7 @@ export function Tabbar({}) { const ref = useRef(null); // const { onMouseDown } = useDraggableScroll(ref); - const tabs = [ - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - "تست۱", - ]; + const tabs = ["فروشگاه دانوین", "مهدی عندلیب"]; return (
    {el} - + ))}