mirror of
https://github.com/makeplane/plane.git
synced 2026-05-18 13:15:59 +02:00
[WIKI-892] fix: description input component re-render #8600
This commit is contained in:
committed by
GitHub
parent
98253e3085
commit
5af0f58aa9
@@ -60,6 +60,10 @@ type Props = {
|
||||
* @description Initial value, pass the actual description to initialize the editor
|
||||
*/
|
||||
initialValue: string | undefined;
|
||||
/**
|
||||
* @description Key, to ensure the editor is re-rendered when the key changes
|
||||
*/
|
||||
key: string;
|
||||
/**
|
||||
* @description Submit handler, the actual function which will be called when the form is submitted
|
||||
*/
|
||||
|
||||
@@ -176,6 +176,7 @@ export const InboxIssueMainContent = observer(function InboxIssueMainContent(pro
|
||||
entityId={issue.id}
|
||||
fileAssetType={EFileAssetType.ISSUE_DESCRIPTION}
|
||||
initialValue={issue.description_html ?? "<p></p>"}
|
||||
key={issue.id}
|
||||
onSubmit={async (value, isMigrationUpdate) => {
|
||||
if (!issue.id || !issue.project_id) return;
|
||||
await issueOperations.update(workspaceSlug, issue.project_id, issue.id, {
|
||||
|
||||
@@ -140,6 +140,7 @@ export const IssueMainContent = observer(function IssueMainContent(props: Props)
|
||||
entityId={issue.id}
|
||||
fileAssetType={EFileAssetType.ISSUE_DESCRIPTION}
|
||||
initialValue={issue.description_html}
|
||||
key={issue.id}
|
||||
onSubmit={async (value, isMigrationUpdate) => {
|
||||
if (!issue.id || !issue.project_id) return;
|
||||
await issueOperations.update(workspaceSlug, issue.project_id, issue.id, {
|
||||
|
||||
@@ -140,6 +140,7 @@ export const PeekOverviewIssueDetails = observer(function PeekOverviewIssueDetai
|
||||
entityId={issue.id}
|
||||
fileAssetType={EFileAssetType.ISSUE_DESCRIPTION}
|
||||
initialValue={issueDescription}
|
||||
key={issue.id}
|
||||
onSubmit={async (value, isMigrationUpdate) => {
|
||||
if (!issue.id || !issue.project_id) return;
|
||||
await issueOperations.update(workspaceSlug, issue.project_id, issue.id, {
|
||||
|
||||
Reference in New Issue
Block a user