I would like to make my row expanded on click. Similar effect takes place here. The problem is that I am getting tr
inside tr
when using each
on new handlebars 1.8.
{{#each positions itemController='position' itemView='url'}}
<td>{{position}}
{{#if showExpanded}}
{{render 'positionDetails' this}}
{{/if}}
{{/each}}
App.UrlView = Ember.View.extend
tagName: 'tr'
App.PositionDetailsView = Ember.View.extend
tagName: 'tr'
Results:
<tr class="ember-view" id="ember7755">
<td>1</td>
<tr class="position-details-view">
</tr>
How can I make it works? I've manged to create only expending function
App.PositionDetailsView = Ember.View.extend
tagName: 'tr'
classNames: 'expanded'
didInsertElement: (->
parent = @.$().parent()
@.$().show().detach().insertAfter(parent)