mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: create comment card for inbox issues fixed
This commit is contained in:
parent
12b4f74e1d
commit
d05ecd8dbc
@ -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,
|
||||
|
@ -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}
|
||||
|
@ -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}
|
||||
|
Loading…
Reference in New Issue
Block a user