From c9dbbf51df2a1c737e62c26e2050ff947b72e322 Mon Sep 17 00:00:00 2001 From: Tibor Postek Date: Wed, 26 Feb 2020 13:11:44 +0100 Subject: [PATCH] #41 fix select all compounds --- js/components/preview/compounds/redux/dispatchActions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/components/preview/compounds/redux/dispatchActions.js b/js/components/preview/compounds/redux/dispatchActions.js index cfbd01ae1..58deb5f89 100644 --- a/js/components/preview/compounds/redux/dispatchActions.js +++ b/js/components/preview/compounds/redux/dispatchActions.js @@ -26,14 +26,15 @@ export const selectAllCompounds = () => (dispatch, getState) => { for (let key in thisVectorList) { for (let index in thisVectorList[key]) { if (index !== 'vector') { - for (let fUCompound in thisVectorList[key][index]) { + for (let indexOfCompound in thisVectorList[key][index]) { var thisObj = { - smiles: thisVectorList[key][index][fUCompound].end, + smiles: thisVectorList[key][index][indexOfCompound].end, vector: thisVectorList[key].vector.split('_')[0], mol: to_query, class: parseInt(currentCompoundClass) }; dispatch(appendToBuyList(thisObj)); + dispatch(addSelectedCompoundClass(currentCompoundClass, indexOfCompound)); } } }