open-nomad/ui/app/components/list-table.js
Buck Doyle 40332963ef
Update to Ember 3.16/Data 3.12 (#8319)
This updates to Ember 3.16 but leaves Ember Data at 3.12 so we don’t need
to use the model fragments beta. It can be reviewed on a commit-by-commit
basis: blueprint updates, fixes for test failures, and the removal of
now-deprecated partials.

It’s not a true update to Octane as that would involve turning on template-only
components by default, which breaks various things. We can accomplish that
separately and then add the edition setting to package.json.
2020-07-09 11:37:00 -05:00

21 lines
587 B
JavaScript

import Component from '@ember/component';
import { computed } from '@ember/object';
import { computed as overridable } from 'ember-overridable-computed';
import { classNames, tagName } from '@ember-decorators/component';
import classic from 'ember-classic-decorator';
@classic
@tagName('table')
@classNames('table')
export default class ListTable extends Component {
@overridable(() => []) source;
// Plan for a future with metadata (e.g., isSelected)
@computed('source.[]')
get decoratedSource() {
return (this.source || []).map(row => ({
model: row,
}));
}
}