From 8a941894d2c965287fd1237b88074ff31ab84929 Mon Sep 17 00:00:00 2001 From: Denys Bohdan Date: Mon, 13 Nov 2023 11:05:55 +0100 Subject: [PATCH] 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 319bc634e..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({