We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cef7d95 commit 41675c6Copy full SHA for 41675c6
src/JsonTree.js
@@ -14,6 +14,7 @@ import { ADD_DELTA_TYPE, REMOVE_DELTA_TYPE, UPDATE_DELTA_TYPE } from './types/de
14
import { getObjectType } from './utils/objectTypes';
15
import DATA_TYPES from './types/dataTypes';
16
import INPUT_USAGE_TYPES from './types/inputUsageTypes';
17
+import parse from './utils/parse';
18
19
/* ************************************* */
20
/* ******** VARIABLES ******** */
@@ -74,6 +75,7 @@ const defaultProps = {
74
75
beforeAddAction: (key, keyPath, deep, newValue) => new Promise(resolve => resolve()),
76
beforeUpdateAction: (key, keyPath, deep, oldValue, newValue) => new Promise(resolve => resolve()),
77
logger: { error: () => {} },
78
+ onSubmitValueParser: (isEditMode, keyPath, deep, name, rawValue) => parse(rawValue),
79
// inputElement : (usage, keyPath, deep, keyName, data, dataType)
80
// textareaElement : (usage, keyPath, deep, keyName, data, dataType)
81
/* eslint-enable */
src/components/JsonAddValue.js
@@ -9,7 +9,6 @@
9
import React, { Component } from 'react';
10
import PropTypes from 'prop-types';
11
import { HotKeys } from 'react-hotkeys';
12
-import parse from '../utils/parse';
13
import inputUsageTypes from '../types/inputUsageTypes';
@@ -25,15 +24,14 @@ const propTypes = {
25
24
inputElementGenerator: PropTypes.func,
26
keyPath: PropTypes.array,
27
deep: PropTypes.number,
28
- onSubmitValueParser: PropTypes.func,
+ onSubmitValueParser: PropTypes.func.isRequired,
29
};
30
// Default props
31
const defaultProps = {
32
onlyValue: false,
33
addButtonElement: <button>+</button>,
34
cancelButtonElement: <button>c</button>,
35
inputElementGenerator: () => <input />,
36
- onSubmitValueParser: (isEditMode, keyPath, deep, name, value) => parse(value),
37
38
39
src/components/JsonArray.js
@@ -40,7 +40,7 @@ const propTypes = {
40
beforeAddAction: PropTypes.func,
41
beforeUpdateAction: PropTypes.func,
42
logger: PropTypes.object.isRequired,
43
44
45
46
src/components/JsonFunctionValue.js
import { isComponentWillChange } from '../utils/objectTypes';
@@ -33,7 +32,7 @@ const propTypes = {
textareaElementGenerator: PropTypes.func,
minusMenuElement: PropTypes.element,
@@ -45,7 +44,6 @@ const defaultProps = {
textareaElementGenerator: () => <textarea />,
47
minusMenuElement: <span> - </span>,
48
49
50
51
src/components/JsonNode.js
@@ -42,7 +42,7 @@ const propTypes = {
src/components/JsonObject.js
src/components/JsonValue.js
@@ -44,7 +43,6 @@ const defaultProps = {
0 commit comments