mateusmaso/handlebars.binding

Each binding does not work when inside a select

Owlbertz opened this issue · 5 comments

The following code will not render any option elements inside the select.

<select>
    {{#each items bind=true}}
        <option value="{{value}}">{{name}}</option>
    {{/each}}
</select>

Can you describe the data structure (context) so I can debug this scenario?

Hi, I created this pen that reproduces the image. My actual context is a bit more complex, but I guess this is a general problem as it also fails with the simple structure I used here.

This is a very weird bug, I'll try to figure out what is happening and write a test for it.

Well, this bug was very weird indeed. I figured out that some html elements such as the select don't allow custom elements inside their own block. Please update your project & codepen to 0.4.0. Now it should work just fine 🍺

Works in the pen, will update the project as well. Thanks for the fast fix (again)!