Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/hooks/src/use-outside-click-detector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ export const useOutsideClickDetector = (
return () => {
document.removeEventListener("mousedown", handleClick, useCapture);
};
});
}, [ref, callback, useCapture]);
};
5 changes: 4 additions & 1 deletion web/ce/components/issues/quick-add/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,10 @@ export const QuickAddIssueFormRoot: FC<TQuickAddIssueFormRoot> = observer((props

if (!projectDetail) return <></>;

const QUICK_ADD_ISSUE_FORMS: Record<EIssueLayoutTypes, FC<TQuickAddIssueForm>> = {
const QUICK_ADD_ISSUE_FORMS: Record<
EIssueLayoutTypes,
React.ForwardRefExoticComponent<TQuickAddIssueForm & React.RefAttributes<HTMLFormElement>>
> = {
[EIssueLayoutTypes.LIST]: ListQuickAddIssueForm,
[EIssueLayoutTypes.KANBAN]: KanbanQuickAddIssueForm,
[EIssueLayoutTypes.CALENDAR]: CalendarQuickAddIssueForm,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { FC } from "react";
import { forwardRef } from "react";
import { observer } from "mobx-react";
import { TQuickAddIssueForm } from "../root";

export const CalendarQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) => {
const { ref, isOpen, projectDetail, register, onSubmit, isEpic } = props;
export const CalendarQuickAddIssueForm = observer(forwardRef<HTMLFormElement, TQuickAddIssueForm>((props, ref) => {
const { isOpen, projectDetail, register, onSubmit, isEpic } = props;

return (
<div
Expand All @@ -29,4 +29,4 @@ export const CalendarQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props
</form>
</div>
);
});
}));
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { FC } from "react";
import { forwardRef } from "react";
import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n";
import { cn } from "@plane/utils";
import { TQuickAddIssueForm } from "../root";

export const GanttQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) => {
const { ref, projectDetail, hasError, register, onSubmit, isEpic } = props;
export const GanttQuickAddIssueForm = observer(forwardRef<HTMLFormElement, TQuickAddIssueForm>((props, ref) => {
const { projectDetail, hasError, register, onSubmit, isEpic } = props;
const { t } = useTranslation();
return (
<div className={cn("shadow-custom-shadow-sm", hasError && "border border-red-500/20 bg-red-500/10")}>
Expand All @@ -32,4 +32,4 @@ export const GanttQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) =
</div>
</div>
);
});
}));
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { FC } from "react";
import { forwardRef } from "react";
import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n";
import { TQuickAddIssueForm } from "../root";

export const KanbanQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) => {
const { ref, projectDetail, register, onSubmit, isEpic } = props;
export const KanbanQuickAddIssueForm = observer(forwardRef<HTMLFormElement, TQuickAddIssueForm>((props, ref) => {
const { projectDetail, register, onSubmit, isEpic } = props;
const { t } = useTranslation();
return (
<div className="m-1 overflow-hidden rounded shadow-custom-shadow-sm">
Expand All @@ -26,4 +26,4 @@ export const KanbanQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props)
</div>
</div>
);
});
}));
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { FC } from "react";
import { forwardRef } from "react";
import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n";
import { TQuickAddIssueForm } from "../root";

export const ListQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) => {
const { ref, projectDetail, register, onSubmit, isEpic } = props;
export const ListQuickAddIssueForm = observer(forwardRef<HTMLFormElement, TQuickAddIssueForm>((props, ref) => {
const { projectDetail, register, onSubmit, isEpic } = props;
const { t } = useTranslation();
return (
<div className="shadow-custom-shadow-sm">
Expand All @@ -31,4 +31,4 @@ export const ListQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) =>
</div>
</div>
);
});
}));
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { FC } from "react";
import { forwardRef } from "react";
import { observer } from "mobx-react";
import { useTranslation } from "@plane/i18n";
import { TQuickAddIssueForm } from "../root";

export const SpreadsheetQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((props) => {
const { ref, projectDetail, register, onSubmit, isEpic } = props;
export const SpreadsheetQuickAddIssueForm = observer(forwardRef<HTMLFormElement, TQuickAddIssueForm>((props, ref) => {
const { projectDetail, register, onSubmit, isEpic } = props;
const { t } = useTranslation();
return (
<div className="pb-2">
Expand All @@ -29,4 +29,4 @@ export const SpreadsheetQuickAddIssueForm: FC<TQuickAddIssueForm> = observer((pr
</p>
</div>
);
});
}));
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { useEventTracker } from "@/hooks/store";
import { QuickAddIssueFormRoot } from "@/plane-web/components/issues";

export type TQuickAddIssueForm = {
ref: React.RefObject<HTMLFormElement>;
isOpen: boolean;
projectDetail: IProject;
hasError: boolean;
Expand Down