Sidebar multi selection actions keep now the card sorting (cards moving, cards to archive etc.)

This commit is contained in:
Martin Filser 2021-11-24 09:05:46 +01:00
parent 6d3b979d67
commit cb7ec54be2

View file

@ -99,14 +99,14 @@ BlazeComponent.extendComponent({
}).register('filterSidebar');
function mutateSelectedCards(mutationName, ...args) {
Cards.find(MultiSelection.getMongoSelector()).forEach(card => {
Cards.find(MultiSelection.getMongoSelector(), {sort: ['sort']}).forEach(card => {
card[mutationName](...args);
});
}
BlazeComponent.extendComponent({
mapSelection(kind, _id) {
return Cards.find(MultiSelection.getMongoSelector()).map(card => {
return Cards.find(MultiSelection.getMongoSelector(), {sort: ['sort']}).map(card => {
const methodName = kind === 'label' ? 'hasLabel' : 'isAssigned';
return card[methodName](_id);
});