1
0
Fork 0
ember-file-download-list-ex.../app/components/file-table-item.js
2018-12-16 13:28:57 -06:00

14 lines
390 B
JavaScript

import Component from '@ember/component';
import { computed } from '@ember/object';
const defaultFile = {};
const defaultSelectedFilePaths = [];
export default Component.extend({
file: defaultFile,
selectedFilePaths: defaultSelectedFilePaths,
isSelected: computed('file.path', 'selectedFilePaths', function() {
return this.selectedFilePaths.includes(this.file.path);
}),
});