Skip to content

Commit

Permalink
[docs] Fix undo/redo in live editor (#35163)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 15, 2022
1 parent 1c897f8 commit 30e42b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/modules/components/Demo.js
Expand Up @@ -472,6 +472,8 @@ export default function Demo(props) {
/>
) : (
<DemoEditor
// Mount a new text editor when the preview mode change to reset the undo/redo history.
key={editorCode.isPreview}
value={editorCode.value}
onChange={(value) => {
setEditorCode({
Expand Down

0 comments on commit 30e42b8

Please sign in to comment.