mirror of
https://github.com/vale981/Vulcan
synced 2025-03-07 02:21:43 -05:00
fix post edit isSelected
This commit is contained in:
parent
10d1e18737
commit
312b006988
1 changed files with 2 additions and 2 deletions
|
@ -13,12 +13,12 @@ Template.afCategory_bootstrap3.helpers({
|
||||||
menuItems: function () {
|
menuItems: function () {
|
||||||
var selectedCategories = this.value;
|
var selectedCategories = this.value;
|
||||||
var menuItems = _.map(Categories.find({}, {sort: {order: 1, name: 1}}).fetch(), function (category) {
|
var menuItems = _.map(Categories.find({}, {sort: {order: 1, name: 1}}).fetch(), function (category) {
|
||||||
category.isSelected = _.contains(selectedCategories, category._id);
|
|
||||||
return {
|
return {
|
||||||
_id: category._id,
|
_id: category._id,
|
||||||
parentId: category.parentId,
|
parentId: category.parentId,
|
||||||
template: "category_input_item",
|
template: "category_input_item",
|
||||||
label: category.name
|
label: category.name,
|
||||||
|
isSelected: _.contains(selectedCategories, category._id)
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return menuItems;
|
return menuItems;
|
||||||
|
|
Loading…
Add table
Reference in a new issue