fix: create comment card for inbox issues fixed

This commit is contained in:
Palanikannan1437 2024-05-02 15:43:32 +05:30
parent 12b4f74e1d
commit d05ecd8dbc
3 changed files with 10 additions and 1 deletions

View File

@ -31,6 +31,8 @@ export interface ILiteTextEditor {
highlights: () => Promise<IMentionHighlight[]>;
suggestions?: () => Promise<IMentionSuggestion[]>;
};
id?: string;
tabIndex?: number;
placeholder?: string | ((isFocused: boolean, value: string) => string);
}
@ -48,11 +50,13 @@ const LiteTextEditor = (props: ILiteTextEditor) => {
tabIndex,
mentionHandler,
placeholder = "Add comment...",
id = "",
} = props;
const editor = useEditor({
onChange,
initialValue,
id,
value,
editorClassName,
restoreFile: fileHandler.restore,

View File

@ -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, issueId, projectId, activityOperations, showAccessSpecifier = false } = props;
// refs
const editorRef = useRef<any>(null);
// store hooks
@ -71,6 +72,8 @@ export const IssueCommentCreate: FC<TIssueCommentCreate> = (props) => {
control={control}
render={({ field: { value, onChange } }) => (
<LiteTextEditor
id={"add_comment_" + issueId}
value={"<p></p>"}
workspaceId={workspaceId}
projectId={projectId}
workspaceSlug={workspaceSlug}

View File

@ -146,6 +146,7 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
/>
{!disabled && (
<IssueCommentCreate
issueId={issueId}
projectId={projectId}
workspaceSlug={workspaceSlug}
activityOperations={activityOperations}
@ -165,6 +166,7 @@ export const IssueActivity: FC<TIssueActivity> = observer((props) => {
/>
{!disabled && (
<IssueCommentCreate
issueId={issueId}
projectId={projectId}
workspaceSlug={workspaceSlug}
activityOperations={activityOperations}