2017-12-15 21:39:18 +00:00
|
|
|
import Component from '@ember/component';
|
|
|
|
import { computed } from '@ember/object';
|
2019-10-15 18:32:58 +00:00
|
|
|
import { computed as overridable } from 'ember-overridable-computed';
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
export default Component.extend({
|
|
|
|
tagName: 'table',
|
|
|
|
classNames: ['table'],
|
|
|
|
|
2019-10-15 18:32:58 +00:00
|
|
|
source: overridable(() => []),
|
2017-09-19 14:47:10 +00:00
|
|
|
|
|
|
|
// Plan for a future with metadata (e.g., isSelected)
|
|
|
|
decoratedSource: computed('source.[]', function() {
|
2019-03-26 07:46:44 +00:00
|
|
|
return this.source.map(row => ({
|
2017-09-19 14:47:10 +00:00
|
|
|
model: row,
|
|
|
|
}));
|
|
|
|
}),
|
|
|
|
});
|