Skip to content

Commit

Permalink
disable major select
Browse files Browse the repository at this point in the history
  • Loading branch information
AngelaZQ1 committed Feb 1, 2024
1 parent d2dfc7c commit 0e0bf6b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/frontend-v2/components/Form/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type PlanSelectProps = {
/** Are the field values numbers. */
isNumeric?: boolean;
isSearchable?: boolean;
isDisabled?: boolean;
/** An option in the select dropdown that indicates "no selection". */
noValueOptionLabel?: string;
};
Expand All @@ -37,6 +38,7 @@ export const PlanSelect: React.FC<PlanSelectProps> = ({
rules,
isNumeric,
isSearchable,
isDisabled,
noValueOptionLabel,
}) => {
const {
Expand Down Expand Up @@ -89,6 +91,7 @@ export const PlanSelect: React.FC<PlanSelectProps> = ({
onChange={onChange}
value={selectedOption}
isSearchable={isSearchable}
isDisabled={isDisabled}
defaultValue={noValueOption}
{...fieldRest}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend-v2/components/Plan/AddPlanModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,8 +243,8 @@ export const AddPlanModal: React.FC<AddPlanModalProps> = ({
setValue("concentration", "");
}}
rules={{ required: "Major is required." }}
helperText='First select your catalog year. If you still cannot find your major, select "No Major" above.'
isSearchable
isDisabled={!!!catalogYear}
/>
<PlanConcentrationsSelect
catalogYear={catalogYear}
Expand Down

0 comments on commit 0e0bf6b

Please sign in to comment.