From 4ad4a5bbe9b3e009bf288c8c2b9bcddb74fc1408 Mon Sep 17 00:00:00 2001 From: mahdi andalib Date: Tue, 15 Feb 2022 20:18:39 +0330 Subject: [PATCH] arrow down left fixed --- src/components/ReactTable4/BasicTable.js | 19 ++++++++++++++----- src/components/ReactTable4/Buttons.js | 6 ++++-- src/components/ReactTable4/MOCK_DATA.json | 8 ++++---- 3 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/components/ReactTable4/BasicTable.js b/src/components/ReactTable4/BasicTable.js index 97f8efd..6c65e69 100644 --- a/src/components/ReactTable4/BasicTable.js +++ b/src/components/ReactTable4/BasicTable.js @@ -272,7 +272,7 @@ const BasicTable = ({ settingsIcon }) => { {row.isExpanded ? ( - {renderRowSubComponent({ row: row.original })} + {renderRowSubComponent({ rows: row.original })} {/* {renderRowSubComponent({ row: row.values })} */} @@ -367,11 +367,20 @@ const BasicTable = ({ settingsIcon }) => { ); }; -function renderRowSubComponent({ row }) { +function renderRowSubComponent({ rows }) { + const persian = { + weight: "وزن", + pageNumber: "تعداد صفحات", + pageType: "نوع کاغذ", + bookNumber: "شماره شابک", + publisher: "انتشارات", + author: "نویسنده", + bookType: "قطع", + publishedYear: "سال انتشار", + }; return ( -
- مبلغ: {row.history} -
+
+ مبلغ: {rows.history}
); diff --git a/src/components/ReactTable4/Buttons.js b/src/components/ReactTable4/Buttons.js index b90a510..fa0ff92 100644 --- a/src/components/ReactTable4/Buttons.js +++ b/src/components/ReactTable4/Buttons.js @@ -7,11 +7,13 @@ import { useState } from "react"; export function Buttons({ row }) { const [activeDetails, setActiveDetails] = useState(null); return ( -
+