stringify Longtext

This commit is contained in:
shams mosowi
2019-10-14 14:49:47 +11:00
parent 88f2881981
commit 56b59e630d

View File

@@ -32,7 +32,7 @@ interface Props {
const LongText = (props: Props) => {
const { value, onSubmit } = props;
const [text, setText] = useState(value ? value : "");
const [text, setText] = useState(value ? JSON.stringify(value) : "");
useEffect(() => {
if (text !== value) setText(value);
}, [value]);