Skip to content

Commit

Permalink
fix: inbox create issue comment fixed (#4340)
Browse files Browse the repository at this point in the history
  • Loading branch information
Palanikannan1437 authored May 2, 2024
1 parent c4229c9 commit 4c78cd7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/editor/lite-text-editor/src/ui/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export interface ILiteTextEditor {
};
tabIndex?: number;
placeholder?: string | ((isFocused: boolean, value: string) => string);
id?: string;
}

const LiteTextEditor = (props: ILiteTextEditor) => {
Expand All @@ -48,12 +49,14 @@ const LiteTextEditor = (props: ILiteTextEditor) => {
tabIndex,
mentionHandler,
placeholder = "Add comment...",
id = "",
} = props;

const editor = useEditor({
onChange,
initialValue,
value,
id,
editorClassName,
restoreFile: fileHandler.restore,
uploadFile: fileHandler.upload,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ type TIssueCommentCreate = {
workspaceSlug: string;
activityOperations: TActivityOperations;
showAccessSpecifier?: boolean;
issueId: string;
};

export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {
const { workspaceSlug, projectId, activityOperations, showAccessSpecifier = false } = props;
const { workspaceSlug, projectId, issueId, activityOperations, showAccessSpecifier = false } = props;
// refs
const editorRef = useRef<any>(null);
// store hooks
Expand Down Expand Up @@ -72,6 +73,8 @@ export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {
render={({ field: { value, onChange } }) => (
<LiteTextEditor
workspaceId={workspaceId}
id={"add_comment_" + issueId}
value={"<p></p>"}
projectId={projectId}
workspaceSlug={workspaceSlug}
onEnterKeyPress={(e) => {
Expand Down
2 changes: 2 additions & 0 deletions web/components/issues/issue-detail/issue-activity/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
/>
{!disabled && (
<IssueCommentCreate
issueId={issueId}
projectId={projectId}
workspaceSlug={workspaceSlug}
activityOperations={activityOperations}
Expand All @@ -165,6 +166,7 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
/>
{!disabled && (
<IssueCommentCreate
issueId={issueId}
projectId={projectId}
workspaceSlug={workspaceSlug}
activityOperations={activityOperations}
Expand Down

0 comments on commit 4c78cd7

Please sign in to comment.