master
mahdi andalib 3 years ago
parent 7a70b37c30
commit 78c7dd7b80
  1. 34
      src/components/ReactTable4/Buttons.js
  2. 4
      src/components/ReactTable4/RenderRowSubComponent.js

@ -8,20 +8,28 @@ export const Buttons = ({ row, addTab }) => {
const [activeDetails, setActiveDetails] = useState(null);
return (
<div className="flex flex-row items-center justify-end">
<button
className="mx-1 flex flex-row items-center justify-around p-2 rounded border border-gray-300"
onClick={() => setActiveDetails(!activeDetails)}
{...row.getToggleRowExpandedProps()}
<div
className=""
onClick={() => {
console.log("mahdi");
setActiveDetails(!activeDetails);
}}
>
جزئیات
<img
src={arrowIcon}
alt=""
className={`mx-1 w-3 cursor-pointer mr-2 ${
activeDetails ? "rotate-60" : "rotate-90"
}`}
/>
</button>
<button
className="mx-1 flex flex-row items-center justify-around p-2 rounded border border-gray-300"
{...row.getToggleRowExpandedProps()}
>
جزئیات
<img
// onClick={() => setActiveDetails(!activeDetails)}
src={arrowIcon}
alt=""
className={`mx-1 w-3 cursor-pointer mr-2 ${
activeDetails ? "rotate-60" : "rotate-90"
}`}
/>
</button>
</div>
<div
className="mx-1 p-2 rounded border border-gray-300 cursor-pointer"
onClick={() => {

@ -5,12 +5,12 @@ const RenderRowSubComponent = ({ columns, addTab, row }) => {
return (
<div
className="w-full flex flex-row items-center border-r-4 border-blue-600 p-2"
className="w-full flex flex-row items-center border-r-4 border-blue-600 p-2 "
style={{ backgroundColor: "#FBFCFE" }}
>
{/* right */}
<div
className="flex flex-row flex-wrap items-center"
className="flex flex-row flex-wrap items-center "
style={{ width: "90%" }}
>
{/* 1 */}

Loading…
Cancel
Save