From 7574460249dd88a68af02a50bf09350d88cb0ddd Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 16 Dec 2020 10:11:36 -0500 Subject: [PATCH] buffer on frontend for send collection --- src/client/components/containers/ReqResContainer.jsx | 6 ++++-- src/client/controllers/reqResController.js | 7 ------- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/client/components/containers/ReqResContainer.jsx b/src/client/components/containers/ReqResContainer.jsx index 952c041b9..9ccfb7da0 100644 --- a/src/client/components/containers/ReqResContainer.jsx +++ b/src/client/components/containers/ReqResContainer.jsx @@ -46,8 +46,10 @@ const ReqResContainer = (props) => { type="button" onClick={() => { for (let i = 0; i < reqResArray.length; i++) { - ReqResCtrl.openReqRes(reqResArray[i].id); - dispatch(actions.saveCurrentResponseData(reqResArray[i])); + setTimeout(function(){ + ReqResCtrl.openReqRes(reqResArray[i].id); + dispatch(actions.saveCurrentResponseData(reqResArray[i])); + }, 800); } }} > diff --git a/src/client/controllers/reqResController.js b/src/client/controllers/reqResController.js index 37715732b..79d3deeb3 100644 --- a/src/client/controllers/reqResController.js +++ b/src/client/controllers/reqResController.js @@ -148,13 +148,6 @@ const connectionController = { clearAllGraph() { store.default.dispatch(actions.clearAllGraph()); }, - // //check to see if reqRes has a request -- might delete, miguel - // collectionCheck() { - // console.log('cc ran!'); - // let { reqResArray } = store.default.getState().business; - // if (reqResArray.length > 0) return false; - // return true; - // } }; export default connectionController;