@truedat/core 6.0.4 → 6.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@truedat/core",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.5",
|
|
4
4
|
"description": "Truedat Web Core",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"jsnext:main": "src/index.js",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@testing-library/jest-dom": "^5.16.5",
|
|
36
36
|
"@testing-library/react": "^12.0.0",
|
|
37
37
|
"@testing-library/user-event": "^13.2.1",
|
|
38
|
-
"@truedat/test": "6.0.
|
|
38
|
+
"@truedat/test": "6.0.5",
|
|
39
39
|
"babel-jest": "^28.1.0",
|
|
40
40
|
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
41
41
|
"babel-plugin-lodash": "^3.3.4",
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
"react-dom": ">= 16.8.6 < 17",
|
|
118
118
|
"semantic-ui-react": ">= 2.0.3 < 2.2"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "abbaf37328ae24646d2a2c2851f77a611e5476d8"
|
|
121
121
|
}
|
|
@@ -138,12 +138,14 @@ export const RichTextEditor = ({
|
|
|
138
138
|
onChange,
|
|
139
139
|
name,
|
|
140
140
|
}) => {
|
|
141
|
-
const [jsonValue, setJsonValue] = useState(
|
|
141
|
+
const [jsonValue, setJsonValue] = useState(
|
|
142
|
+
_.isEmpty(propValue) ? EMPTY_VALUE : propValue
|
|
143
|
+
);
|
|
142
144
|
const [value, setValue] = useState(Value.fromJSON(jsonValue));
|
|
143
145
|
const [editor, setEditor] = useState();
|
|
144
146
|
|
|
145
147
|
useEffect(() => {
|
|
146
|
-
if (!_.equals(propValue)(jsonValue)) {
|
|
148
|
+
if (!_.isEmpty(propValue) && !_.equals(propValue)(jsonValue)) {
|
|
147
149
|
setValue(Value.fromJSON(propValue));
|
|
148
150
|
}
|
|
149
151
|
}, [propValue]);
|