Mark contributor in list as selected when opening details

This commit is contained in:
2019-07-12 16:02:32 +02:00
parent 8a156f964b
commit d9ae654f42
6 changed files with 26 additions and 13 deletions
+11 -3
View File
@@ -11,14 +11,22 @@ export default Route.extend({
return this.contributors.findBy('id', params.id);
},
activate () {
setupController (controller, model) {
this._super(controller, model);
this.controllerFor('dashboard')
.set('showDetailsPane', true);
.setProperties({
showDetailsPane: true,
selectedContributorId: model.id
});
},
deactivate () {
this.controllerFor('dashboard')
.set('showDetailsPane', false);
.setProperties({
showDetailsPane: false,
selectedContributorId: null
});
}
});