From 777e55e04fb5197f2fbe1ebae5632f317bc38e5e Mon Sep 17 00:00:00 2001 From: Stanislav Lunyachek Date: Thu, 4 Apr 2024 23:41:54 +0300 Subject: [PATCH] fix: Fix rows counter in the Edit Grade modal window --- .../__snapshots__/index.test.jsx.snap | 2 +- .../EditModal/OverrideTable/index.jsx | 20 ++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/components/GradesView/EditModal/OverrideTable/__snapshots__/index.test.jsx.snap b/src/components/GradesView/EditModal/OverrideTable/__snapshots__/index.test.jsx.snap index 9fb2a581..2ba98eb9 100644 --- a/src/components/GradesView/EditModal/OverrideTable/__snapshots__/index.test.jsx.snap +++ b/src/components/GradesView/EditModal/OverrideTable/__snapshots__/index.test.jsx.snap @@ -20,6 +20,6 @@ exports[`OverrideTable component render snapshot 1`] = ` }, ] } - itemCount={2} + itemCount={3} /> `; diff --git a/src/components/GradesView/EditModal/OverrideTable/index.jsx b/src/components/GradesView/EditModal/OverrideTable/index.jsx index bab0054a..3b81c291 100644 --- a/src/components/GradesView/EditModal/OverrideTable/index.jsx +++ b/src/components/GradesView/EditModal/OverrideTable/index.jsx @@ -20,18 +20,20 @@ export const OverrideTable = () => { if (hide) { return null; } + const tableData = [ + ...data, + { + adjustedGrade: , + date: formatDateForDisplay(new Date()), + reason: , + }, + ]; + return ( , - date: formatDateForDisplay(new Date()), - reason: , - }, - ]} - itemCount={data.length} + data={tableData} + itemCount={tableData.length} /> ); };