fix(signature): force re-render on value change

This commit is contained in:
enes 2024-11-18 13:39:54 +01:00
parent cdf26b6614
commit a1c308727f
2 changed files with 10 additions and 2 deletions

View File

@ -85,7 +85,11 @@ export const MarkInputSignature = ({
></canvas>
{typeof userMark?.mark !== 'undefined' && (
<div className={styles.absolute}>
<MarkRenderSignature value={value} mark={userMark.mark} />
<MarkRenderSignature
key={userMark.mark.value}
value={userMark.mark.value}
mark={userMark.mark}
/>
</div>
)}
<div className={styles.reset}>

View File

@ -51,7 +51,11 @@ const PdfMarkItem = forwardRef<HTMLDivElement, PdfMarkItemProps>(
}}
>
{typeof MarkRenderComponent !== 'undefined' && (
<MarkRenderComponent value={getMarkValue()} mark={userMark.mark} />
<MarkRenderComponent
key={getMarkValue()}
value={getMarkValue()}
mark={userMark.mark}
/>
)}
</div>
)