Best way to do a dropdown menu using blaze and dynamic data

I’ve been building my forms and just entering the data, but I’ve been thinking about making a blaze component that I can use over and over and pull data down from mongo. Is this the best way to do it or are there some other dynamic options out there?

I did not quite follow your idea. Do you want to create a component to pull data from the server and create a “dynamic” (call it assync) drop down menu? Is this correct?

if it is… I believe that is not big deal in using blaze with {{#each option in options}}, and pass the the options as parameter on the argument. Not sure about performance wise though.

I just saw this reply not sure how I missed it. I was able to figure this out using a publication. I’m sure this is not the best way to do this. It works for now but I will still look for a better solution.

To answer your question yes I wanted a drop down component that got its fields for the dropDown to come from mongo. The same way some php devs render dropdowns from php

1 Like