From acaeba7646bfc61247d9456bf96a19fd6de3095c Mon Sep 17 00:00:00 2001 From: Denys Bohdan Date: Tue, 14 Nov 2023 12:35:20 +0100 Subject: [PATCH] UIIN-2497 Fix exception when closing Fast Add record modal (#2344) * UIIN-2497 Fix exception when closing Fast Add record modal * UIIN-2497 Added method to handle closing of fast add record modal --- src/components/InstancesList/InstancesList.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/InstancesList/InstancesList.js b/src/components/InstancesList/InstancesList.js index 212574b75..28b7192f7 100644 --- a/src/components/InstancesList/InstancesList.js +++ b/src/components/InstancesList/InstancesList.js @@ -548,7 +548,13 @@ class InstancesList extends React.Component { } } - toggleNewFastAddModal = ({ instanceRecord }) => { + toggleNewFastAddModal = () => { + this.setState((state) => { + return { showNewFastAddModal: !state.showNewFastAddModal }; + }); + } + + handleFastAddModalClose = ({ instanceRecord } = {}) => { const { history, location, @@ -561,9 +567,7 @@ class InstancesList extends React.Component { }); } - this.setState((state) => { - return { showNewFastAddModal: !state.showNewFastAddModal }; - }); + this.toggleNewFastAddModal(); } generateHoldingsIdReport = async (sendCallout) => { @@ -729,7 +733,7 @@ class InstancesList extends React.Component { {!checkIfUserInCentralTenant(stripes) && ( ( this.getActionItem({