1
0
Fork 0

WIP: update field data handling to support column toggling

Dieser Commit ist enthalten in:
angusmcleod 2021-08-25 09:59:24 +08:00
Ursprung 55b92f4256
Commit 03fb7b7ada

Datei anzeigen

@ -24,6 +24,18 @@ export default Controller.extend({
this.set("loadingMore", false); this.set("loadingMore", false);
}); });
}, },
@discourseComputed('submissions', 'fields.@each.enabled')
displaySubmissions(submissions, fields) {
return submissions.map(submission => {
let field = fields.find(f => Object.keys(submission).includes(f.id));
if (!field.enabled) {
submission.delete(field.id);
};
return submission;
});
},
actions: { actions: {
loadMore() { loadMore() {