attempting to make product load better in drop down

This commit is contained in:
Brian McGonagill 2025-08-02 15:45:34 -05:00
parent 9223f21e06
commit 839390f820

View file

@ -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({
}
}
}
});
});