Skip to content

Commit

Permalink
#3004 - Allow to select items from the Favorites tab
Browse files Browse the repository at this point in the history
  • Loading branch information
nanoblit committed Oct 2, 2023
1 parent 4cb74d0 commit f837a5c
Showing 1 changed file with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,15 @@ const MonomerGroup = ({

const selectMonomer = (monomer: MonomerItemType) => {
dispatch(selectTool('monomer'));
switch (libraryName) {
case 'PEPTIDE':
editor.events.selectMonomer.dispatch(monomer);
onItemClick(monomer);
break;
case 'CHEM':
editor.events.selectMonomer.dispatch(monomer);
onItemClick(monomer);
break;
default:
onItemClick(monomer);
break;

if (
libraryName != null &&
['FAVORITES', 'PEPTIDE', 'CHEM'].includes(libraryName)
) {
editor.events.selectMonomer.dispatch(monomer);
onItemClick(monomer);
} else {
onItemClick(monomer);
}
};

Expand Down

0 comments on commit f837a5c

Please sign in to comment.