fix(web): reset markdown widgets when the previewed file changes (#9910)
Co-authored-by: Claude Fable 5 <[email protected]>
This commit is contained in:
1 parent
aefef95ffc
commit
3e1333319a
1 file changed
+4
@@ -1266,7 +1266,11 @@ export default function FilePreviewPanel({
|
||||
</div>
|
||||
) : relativePath && file.data ? (
|
||||
isMarkdown && renderMarkdown ? (
|
||||
// Markdown reconciles in place across text updates, so a file
|
||||
// switch needs a new key or the previous file's disclosure and
|
||||
// wrap state carries into the next document.
|
||||
<RenderedMarkdownSurface
|
||||
key={relativePath}
|
||||
environmentId={environmentId}
|
||||
cwd={cwd}
|
||||
relativePath={relativePath}
|
||||
|
||||
Reference in new issue
Block a user