Skip to content

Commit

Permalink
Merge branch 'master' into UIIN-2689
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 authored Nov 14, 2023
2 parents 88de680 + acaeba7 commit 35d27ef
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/components/InstancesList/InstancesList.js
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,13 @@ class InstancesList extends React.Component {
}
}

toggleNewFastAddModal = ({ instanceRecord }) => {
toggleNewFastAddModal = () => {
this.setState((state) => {
return { showNewFastAddModal: !state.showNewFastAddModal };
});
}

handleFastAddModalClose = ({ instanceRecord } = {}) => {
const {
history,
location,
Expand All @@ -561,9 +567,7 @@ class InstancesList extends React.Component {
});
}

this.setState((state) => {
return { showNewFastAddModal: !state.showNewFastAddModal };
});
this.toggleNewFastAddModal();
}

generateHoldingsIdReport = async (sendCallout) => {
Expand Down Expand Up @@ -729,7 +733,7 @@ class InstancesList extends React.Component {
{!checkIfUserInCentralTenant(stripes) && (
<Pluggable
id="clickable-create-inventory-records"
onClose={this.toggleNewFastAddModal}
onClose={this.handleFastAddModalClose}
open={this.state.showNewFastAddModal} // control the open modal via state var
renderTrigger={() => (
this.getActionItem({
Expand Down

0 comments on commit 35d27ef

Please sign in to comment.