[WIKI-892] fix: description input component re-render #8600

This commit is contained in:
Aaryan Khandelwal 2026-03-05 15:27:02 +05:30 committed by GitHub
parent 98253e3085
commit 5af0f58aa9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 0 deletions

View file

@ -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
*/

View file

@ -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, {

View file

@ -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, {

View file

@ -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, {