Meteor on collection change update Template select element -


i using bootstrap-select make select elements better in meteor app.

however, running issue upon submitting changes meteor collection, reactivity pushes out changes templates, rewriting select elements , destroy original select element, take away bootstrap-select stuff.

i wonder if there's way me prevent happening somehow. tried listen changes , recall selectpicker upon update doesn't work.

applications.find().observe({ changed: function() {     console.log('something changed');             $('.selectpicker').selectpicker(); } }); 

i try delay things little bit, no avail.

applications.find().observe({ changed: function() {     console.log('something changed');     settimeout(function(){         $('.selectpicker').selectpicker();         console.log('trying update select picker');     }, 1000); } }); 

has run problem before , know how fix it?

edit: here's template code

<div class="form-group">     <label for="college" class="control-label">college/ university</label>     <select class="selectpicker" name="college" placeholder="select college/ university">         {{#each colleges}}             <option value="{{slug}}">{{name}}</option>         {{/each}}     </select> </div> 

in html-template, if surround select-element the constant block helper, part inside constant block won't re-rendered. maybe solution?


Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -