Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions addon/components/table-columns.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const DEFAULT_ROW_HEIGHT = 37;
export default Ember.Component.extend({
layout,
classNames: ['table-columns-wrapper'],
classNameBindings: ['columnTypeClass'],

columnType: 'standard',

/**
Expand Down Expand Up @@ -48,12 +50,11 @@ export default Ember.Component.extend({
init() {
this._super(...arguments);

this.classNames.push(`${this.columnType}-table-columns-wrapper`);
this._allColumns = A();
},

/**
If the intiial width/position has been set after rendering.
If the initial width/position has been set after rendering.
@public
*/
widthAndPositionSet: false,
Expand All @@ -75,6 +76,16 @@ export default Ember.Component.extend({
});
}),

/**
* A dynamic class name for this component's top-level columns
* wrapper -- based upon the `columnType`
*/
columnTypeClass: computed('columnType', {
get() {
return `${this.get('columnType')}-table-columns-wrapper`;
}
}),

/**
Returns the width of the total width of this set of table columns,
including borders.
Expand Down