As a newcomer to Meteor, I am facing an issue with populating a select box from a MongoDB collection. Despite my attempts, the solution I tried below did not work as expected:
<template name="clist">
<div class="input-field">
<select>
<option value="" disabled selected>Choose your option</option>
{{#each company}}
<option>{{ccategory}}</option>
{{/each}}
</select>
</div>
<ul class="collection" id="listings">
{{#each company}}
<li>
{{> employees}}
</li>
{{/each}}
</template>
Furthermore, I need assistance in filtering the data in my template based on the selection made in the dropdown list. I am currently stuck and unable to proceed.
The issue lies in the fact that the dropdown list is being populated by all listings rather than directly from the schema, resulting in repetitive values. The returning helper for both these values is identical, using "return company.find()". Any help in resolving this matter would be greatly appreciated.