UPDATE
You finally decide it's time to post on SO, you do so, and then you find a stupid error. Taken care of. Remove ->
from Ember.Table.HeaderCell.extend ->
.
I am attempting to customize my header cells for sorting purposes using the example in #183. Unfortunately, The template I'm passing to headerCellViewClass is not being rendered.
I added in a random class and "asdf" just to prove to myself that my booleans weren't the issue. I can access out headerCellName, sorted, and supportSort through the console, and they all have their expected values.
Ember.Table.ColumnDefinition.create App.SortableColumnMixin, {
columnWidth: 100
textAlign: 'text-align-left'
tableCellViewClass: 'App.ReportValueCell'
headerCellName: columnName
contentPath: columnName
isSortable: yes
}
You'll notice here that I set a custom tableCellViewClass. That one functions perfectly.
App.SortableColumnMixin = Ember.Object.create(
supportSort: true
sorted: false
headerCellViewClass: 'App.SortableHeaderCell'
)
App.SortableHeaderCell = Ember.Table.HeaderCell.extend ->
templateName: 'table/sortable-header-cell'
<div class="ember-table-content-container" {{action sortByColumn view.content}}>
<span class="ember-table-content" class="21340987235">
asdf
{{view.content.headerCellName}}
{{#if view.content.supportSort}}
<div style="float:right;">
{{#if view.content.sorted}}
{{#if sortAscending}}
<div style="cursor:s-resize;" title="Ascending">
↑
</div>
{{else}}
<div style="cursor:n-resize;" title="Descending">
↓
</div>
{{/if}}
{{else}}
⇅
{{/if}}
</div>
{{/if}}
</span>
</div>
Does anyone know better than I why this might be?
UPDATE
You finally decide it's time to post on SO, you do so, and then you find a stupid error. Taken care of. Remove -> from Ember.Table.HeaderCell.extend ->.