open-nomad/ui/app/components/list-table.js

17 lines
380 B
JavaScript
Raw Normal View History

import Component from '@ember/component';
import { computed } from '@ember/object';
2017-09-19 14:47:10 +00:00
export default Component.extend({
tagName: 'table',
classNames: ['table'],
source: computed(() => []),
// 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,
}));
}),
});