mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-26 15:58:50 +00:00
attempting to make product load better in drop down
This commit is contained in:
parent
9223f21e06
commit
839390f820
1 changed files with 20 additions and 8 deletions
|
|
@ -18,17 +18,29 @@ Template.modalLinkProducts.onRendered(function() {
|
|||
dropdownOptions: 4,
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
var instances = M.Modal.init(elems, {});
|
||||
var instancese = M.FormSelect.init(elemse, {
|
||||
dropdownOptions: 4,
|
||||
});
|
||||
}, 250);
|
||||
this.autorun(() => {
|
||||
if (this.subscriptionsReady()) {
|
||||
// setTimeout(function() {
|
||||
// var instances = M.Modal.init(elems, {});
|
||||
var elemse = document.querySelectorAll('select');
|
||||
var instancese = M.FormSelect.init(elemse, {
|
||||
dropdownOptions: 4,
|
||||
});
|
||||
// }, 250);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Template.modalLinkProducts.helpers({
|
||||
products: function() {
|
||||
return Products.find({}, {sort: { prodName:1 }});
|
||||
let prodInfo = Products.find({}, { sort: { prodName:1 }});
|
||||
// return Products.find({}, {sort: { prodName:1 }});
|
||||
if (!prodInfo) {
|
||||
console.log("no product info yet.");
|
||||
} else {
|
||||
console.log("prod info found.");
|
||||
return prodInfo;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -79,4 +91,4 @@ Template.modalLinkProducts.events({
|
|||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue