@uiw/react-markdown-editor
Advanced tools
Comparing version
@@ -127,2 +127,6 @@ "use strict"; | ||
var height = typeof codemirrorProps.height === 'number' ? "".concat(codemirrorProps.height, "px") : codemirrorProps.height; | ||
var preValue = props.value; | ||
(0, _react.useEffect)(function () { | ||
return setValue(preValue !== null && preValue !== void 0 ? preValue : ''); | ||
}, [preValue]); | ||
var previewScrollHandle = (0, _react.useCallback)(function (event) { | ||
@@ -129,0 +133,0 @@ if (!enableScroll) return; |
@@ -70,2 +70,4 @@ import _extends from "@babel/runtime/helpers/extends"; | ||
var height = typeof codemirrorProps.height === 'number' ? codemirrorProps.height + "px" : codemirrorProps.height; | ||
var preValue = props.value; | ||
useEffect(() => setValue(preValue != null ? preValue : ''), [preValue]); | ||
var previewScrollHandle = useCallback(event => { | ||
@@ -72,0 +74,0 @@ if (!enableScroll) return; |
{ | ||
"name": "@uiw/react-markdown-editor", | ||
"version": "5.13.0", | ||
"version": "5.13.1", | ||
"description": "A markdown editor with preview, implemented with React.js and TypeScript.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://uiwjs.github.io/react-markdown-editor", |
Sorry, the diff of this file is not supported yet
165983
0.22%3820
0.21%