forked from github/plane
fix: create view form (#1691)
This commit is contained in:
parent
0cc4468091
commit
bedc3ab5a1
@ -60,20 +60,20 @@ export const ViewForm: React.FC<Props> = ({
|
|||||||
const filters = watch("query");
|
const filters = watch("query");
|
||||||
|
|
||||||
const { data: stateGroups } = useSWR(
|
const { data: stateGroups } = useSWR(
|
||||||
workspaceSlug && projectId && (filters.state ?? []).length > 0
|
workspaceSlug && projectId && (filters?.state ?? []).length > 0
|
||||||
? STATES_LIST(projectId as string)
|
? STATES_LIST(projectId as string)
|
||||||
: null,
|
: null,
|
||||||
workspaceSlug && (filters.state ?? []).length > 0
|
workspaceSlug && (filters?.state ?? []).length > 0
|
||||||
? () => stateService.getStates(workspaceSlug as string, projectId as string)
|
? () => stateService.getStates(workspaceSlug as string, projectId as string)
|
||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
const states = getStatesList(stateGroups);
|
const states = getStatesList(stateGroups);
|
||||||
|
|
||||||
const { data: labels } = useSWR(
|
const { data: labels } = useSWR(
|
||||||
workspaceSlug && projectId && (filters.labels ?? []).length > 0
|
workspaceSlug && projectId && (filters?.labels ?? []).length > 0
|
||||||
? PROJECT_ISSUE_LABELS(projectId.toString())
|
? PROJECT_ISSUE_LABELS(projectId.toString())
|
||||||
: null,
|
: null,
|
||||||
workspaceSlug && projectId && (filters.labels ?? []).length > 0
|
workspaceSlug && projectId && (filters?.labels ?? []).length > 0
|
||||||
? () => issuesService.getIssueLabels(workspaceSlug.toString(), projectId.toString())
|
? () => issuesService.getIssueLabels(workspaceSlug.toString(), projectId.toString())
|
||||||
: null
|
: null
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user