@desynova-digital/components 9.0.10 → 9.0.11

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.
@@ -73,7 +73,7 @@ var DraftInputText = function DraftInputText(_ref) {
73
73
  diff = _useState4[0],
74
74
  setDiff = _useState4[1];
75
75
 
76
- var _useState5 = (0, _react.useState)(autoFocus),
76
+ var _useState5 = (0, _react.useState)(false),
77
77
  _useState6 = _slicedToArray(_useState5, 2),
78
78
  focus = _useState6[0],
79
79
  setFocus = _useState6[1];
@@ -266,9 +266,12 @@ var DraftInputText = function DraftInputText(_ref) {
266
266
  if (diff && value !== '' && value !== undefined) {
267
267
  props.simpleEdit = true;
268
268
  setDiff(false);
269
- setFocus(true);
270
269
  var dummy = (0, _draftConvert.convertFromHTML)(value);
271
270
  var newState = _draftJs.EditorState.createWithContent(dummy);
271
+
272
+ if (focus) {
273
+ isFocused = true;
274
+ }
272
275
  if (isFocused) {
273
276
  setEditorState(function () {
274
277
  return _draftJs.EditorState.moveFocusToEnd(newState);
@@ -278,7 +281,6 @@ var DraftInputText = function DraftInputText(_ref) {
278
281
  }
279
282
  }
280
283
  }, [value]);
281
-
282
284
  /**
283
285
  * This useEffect is used to chnage our value when timeline is changed
284
286
  */
@@ -297,7 +299,6 @@ var DraftInputText = function DraftInputText(_ref) {
297
299
  /**
298
300
  * This useEffect is used to focus on Line1 when a new segment is created
299
301
  */
300
-
301
302
  (0, _react.useEffect)(function () {
302
303
  if (autoFocus) {
303
304
  editorRef.current.focus();
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@desynova-digital/components",
3
- "version": "9.0.10",
3
+ "version": "9.0.11",
4
4
  "description": "Components for Desynova Digital",
5
5
  "main": "index.js",
6
6
  "author": "desynova-digital",
7
7
  "license": "MIT",
8
8
  "repository": "desynova-digital",
9
9
  "dependencies": {
10
- "@desynova-digital/tokens": "9.0.10",
10
+ "@desynova-digital/tokens": "9.0.11",
11
11
  "prop-types": "^15.7.2",
12
12
  "styled-components": "^4.3.2"
13
13
  },