Skip to content
This repository has been archived by the owner on Nov 17, 2021. It is now read-only.

Commit

Permalink
TPF-856 - Made changes to allow for selecting rows with a checkbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
andymoon committed Jan 13, 2017
1 parent 2656844 commit 5cb93b9
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions addon/components/models-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,8 @@ export default Component.extend({
let d = Ember.copy(columnMap[col.propertyName]);
columns.push(Ember.merge(d, col));
usedNames.push(col.propertyName);
} else if (!col.propertyName) {
columns.push(col);
} else {
Ember.warn(`No propertyName found for ${col.propertyName}`, false, {id: 'data-table.columns-builder'});
}
Expand Down Expand Up @@ -585,7 +587,7 @@ export default Component.extend({
* @private
* @name ModelsTable#_selectedItems
*/
_selectedItems: null,
_selectedItems: A([]),

/**
* @type {boolean}
Expand Down Expand Up @@ -982,7 +984,6 @@ export default Component.extend({
* @name ModelsTable#setup
*/
setup: on('init', function() {
this._setupSelectedRows();
this._setupExpandedRows();
this._setupColumns();
this._setupMessages();
Expand Down Expand Up @@ -1022,10 +1023,6 @@ export default Component.extend({
set(this, '_expandedRowIndexes', A([]));
},

_setupSelectedRows() {
set(this, '_selectedItems', A([]));
},

/**
* Wrapper for <code>_setupColumns</code> to call it only once when observer is fired
*
Expand Down

0 comments on commit 5cb93b9

Please sign in to comment.