Skip to content

Commit 047d9f9

Browse files
author
andxu282
committed
fixed dropdowns
1 parent a3cbb70 commit 047d9f9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/ScheduleGenerate/ScheduleGenerateSideBar.vue

+9-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<button
4747
class="add-requirement-button"
4848
@click="addRequirement"
49-
:disabled="Object.keys(availableRequirements).length === 0"
49+
:disabled="requirements.length === numberOfRequirements"
5050
>
5151
+ Requirement
5252
</button>
@@ -76,6 +76,7 @@ export default defineComponent({
7676
data(): {
7777
requirements: string[];
7878
availableRequirements: Record<string, string>;
79+
numberOfRequirements: number;
7980
} {
8081
return {
8182
requirements: [],
@@ -84,6 +85,7 @@ export default defineComponent({
8485
'Probability Requirement': 'Probability Requirement',
8586
'Liberal Studies': 'Liberal Studies',
8687
},
88+
numberOfRequirements: 3,
8789
};
8890
},
8991
components: {
@@ -305,4 +307,10 @@ export default defineComponent({
305307
font-size: 16px;
306308
align-items: center;
307309
}
310+
311+
.add-requirement-button:disabled {
312+
border: 1px solid $inactiveGray;
313+
background: $inactiveGray;
314+
cursor: not-allowed;
315+
}
308316
</style>

0 commit comments

Comments
 (0)