Added typeahead through materialize

This commit is contained in:
Brian McGonagill 2024-07-06 18:19:38 -05:00
parent 909030ea0f
commit cba5026ee4
3 changed files with 39 additions and 14 deletions

View file

@ -37,6 +37,14 @@ Meteor.publish("myProducts", function() {
}
});
Meteor.publish("listProducts", function(itemNameListing) {
try {
return Products.find({ itemName: {$regex: itemNameListing + '.*', $options: 'i'}}, { limit: 5 });
} catch (error) {
console.log(" ERROR pulling items by filtered item name: " + error);
}
});
Meteor.publish("myLists", function() {
try {
return Lists.find( { $or: [ { listOwner: this.userId, listComplete: false }, { listShared: true, listComplete: false } ] } );