multiselect: share forEach selection code in actions.js