From ad4a5fef22d1adad1bc11b3355389dfec0fc5981 Mon Sep 17 00:00:00 2001 From: mahdi Date: Wed, 16 Feb 2022 15:01:23 +0330 Subject: [PATCH] update --- src/components/ReactTable4/EditButtons.js | 75 +++++++++++++---------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/src/components/ReactTable4/EditButtons.js b/src/components/ReactTable4/EditButtons.js index 479dbc9..c73997b 100644 --- a/src/components/ReactTable4/EditButtons.js +++ b/src/components/ReactTable4/EditButtons.js @@ -6,38 +6,51 @@ import more from "./more2.svg"; import DropDown from "./DropDown"; export function EditButtons({ buttons }) { - const [selectedButton, setSelectedButton] = useState(null); + const [activeFilter, setActiveFilter] = useState(null); return ( -
- {buttons.map((button, index) => ( -
-
- setSelectedButton(selectedButton === button ? null : button) - } - > -

{button.title}

- -
-
- ))} -
{selectedButton?.components}
+
+ + {/* filter */} + setActiveFilter(!activeFilter)} + /> + {/* dropDown */} + + {/* dropDownItems */} +
); }