Skip to content

Commit

Permalink
[docs] Fix undo/redo in live editor
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Nov 15, 2022
1 parent 1c897f8 commit d605e5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/src/modules/components/Demo.js
Original file line number Diff line number Diff line change
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 d605e5e

Please sign in to comment.