mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: project select validation (#2723)
This commit is contained in:
parent
5a84ed279d
commit
621d551c4a
@ -272,9 +272,13 @@ export const IssueForm: FC<IssueFormProps> = observer((props) => {
|
||||
<Controller
|
||||
control={control}
|
||||
name="project"
|
||||
render={({ field: { value, onChange } }) => (
|
||||
rules={{
|
||||
required: true,
|
||||
}}
|
||||
render={({ field: { value, onChange }, fieldState: { error } }) => (
|
||||
<IssueProjectSelect
|
||||
value={value}
|
||||
error={error}
|
||||
onChange={(val: string) => {
|
||||
onChange(val);
|
||||
setActiveProject(val);
|
||||
|
@ -1,6 +1,7 @@
|
||||
import React, { useState } from "react";
|
||||
import { useRouter } from "next/router";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import type { FieldError } from "react-hook-form";
|
||||
// mobx store
|
||||
import { useMobxStore } from "lib/mobx/store-provider";
|
||||
// popper js
|
||||
@ -15,6 +16,7 @@ import { Check, Clipboard, Search } from "lucide-react";
|
||||
export interface IssueProjectSelectProps {
|
||||
value: string;
|
||||
onChange: (value: string) => void;
|
||||
error?: FieldError;
|
||||
}
|
||||
|
||||
export const IssueProjectSelect: React.FC<IssueProjectSelectProps> = observer((props) => {
|
||||
|
Loading…
Reference in New Issue
Block a user