FIX: If only one plan, automatically select it
This commit is contained in:
parent
9e66588038
commit
11d9b2e011
|
@ -1,9 +1,15 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
init() {
|
||||||
|
this._super(...arguments);
|
||||||
|
if (this.plans.length === 1) {
|
||||||
|
this.set("selectedPlan", this.plans[0].id);
|
||||||
|
}
|
||||||
|
},
|
||||||
actions: {
|
actions: {
|
||||||
clickPlan(plan) {
|
clickPlan(plan) {
|
||||||
this.set("selectedPlan", plan.id);
|
this.set("selectedPlan", plan.id);
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue