mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: inbox create issue comment fixed (#4340)
This commit is contained in:
parent
c4229c9d55
commit
4c78cd7c7e
@ -33,6 +33,7 @@ export interface ILiteTextEditor {
|
|||||||
};
|
};
|
||||||
tabIndex?: number;
|
tabIndex?: number;
|
||||||
placeholder?: string | ((isFocused: boolean, value: string) => string);
|
placeholder?: string | ((isFocused: boolean, value: string) => string);
|
||||||
|
id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const LiteTextEditor = (props: ILiteTextEditor) => {
|
const LiteTextEditor = (props: ILiteTextEditor) => {
|
||||||
@ -48,12 +49,14 @@ const LiteTextEditor = (props: ILiteTextEditor) => {
|
|||||||
tabIndex,
|
tabIndex,
|
||||||
mentionHandler,
|
mentionHandler,
|
||||||
placeholder = "Add comment...",
|
placeholder = "Add comment...",
|
||||||
|
id = "",
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const editor = useEditor({
|
const editor = useEditor({
|
||||||
onChange,
|
onChange,
|
||||||
initialValue,
|
initialValue,
|
||||||
value,
|
value,
|
||||||
|
id,
|
||||||
editorClassName,
|
editorClassName,
|
||||||
restoreFile: fileHandler.restore,
|
restoreFile: fileHandler.restore,
|
||||||
uploadFile: fileHandler.upload,
|
uploadFile: fileHandler.upload,
|
||||||
|
@ -18,10 +18,11 @@ type TIssueCommentCreate = {
|
|||||||
workspaceSlug: string;
|
workspaceSlug: string;
|
||||||
activityOperations: TActivityOperations;
|
activityOperations: TActivityOperations;
|
||||||
showAccessSpecifier?: boolean;
|
showAccessSpecifier?: boolean;
|
||||||
|
issueId: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {
|
export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {
|
||||||
const { workspaceSlug, projectId, activityOperations, showAccessSpecifier = false } = props;
|
const { workspaceSlug, projectId, issueId, activityOperations, showAccessSpecifier = false } = props;
|
||||||
// refs
|
// refs
|
||||||
const editorRef = useRef<any>(null);
|
const editorRef = useRef<any>(null);
|
||||||
// store hooks
|
// store hooks
|
||||||
@ -72,6 +73,8 @@ export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {
|
|||||||
render={({ field: { value, onChange } }) => (
|
render={({ field: { value, onChange } }) => (
|
||||||
<LiteTextEditor
|
<LiteTextEditor
|
||||||
workspaceId={workspaceId}
|
workspaceId={workspaceId}
|
||||||
|
id={"add_comment_" + issueId}
|
||||||
|
value={"<p></p>"}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
workspaceSlug={workspaceSlug}
|
workspaceSlug={workspaceSlug}
|
||||||
onEnterKeyPress={(e) => {
|
onEnterKeyPress={(e) => {
|
||||||
|
@ -146,6 +146,7 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
|
|||||||
/>
|
/>
|
||||||
{!disabled && (
|
{!disabled && (
|
||||||
<IssueCommentCreate
|
<IssueCommentCreate
|
||||||
|
issueId={issueId}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
workspaceSlug={workspaceSlug}
|
workspaceSlug={workspaceSlug}
|
||||||
activityOperations={activityOperations}
|
activityOperations={activityOperations}
|
||||||
@ -165,6 +166,7 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
|
|||||||
/>
|
/>
|
||||||
{!disabled && (
|
{!disabled && (
|
||||||
<IssueCommentCreate
|
<IssueCommentCreate
|
||||||
|
issueId={issueId}
|
||||||
projectId={projectId}
|
projectId={projectId}
|
||||||
workspaceSlug={workspaceSlug}
|
workspaceSlug={workspaceSlug}
|
||||||
activityOperations={activityOperations}
|
activityOperations={activityOperations}
|
||||||
|
Loading…
Reference in New Issue
Block a user