You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`json` | object or string | `{}` | the json object you want to edit. if you pass a string, the editor will attempt to parse it with `JSON.parse()`.
26
+
|`onChange`| function | `noop` | called whenever a change occurs. the updated json is passed as the first and only argument to the function.
27
+
28
+
## Development
29
+
30
+
### Building
31
+
`npm run build` will run the js through babel and the scss through node-sass and output into `dist/`.
32
+
33
+
The `dist` folder should be committed to the repo.
34
+
35
+
### Linting
36
+
`npm run lint` - please lint before committing any code
37
+
38
+
## Known Issues
39
+
- Typing a decimal as the last character in a number field doesn't work because of the way we coerce the type - if the field is a number type, we try to `parseFloat()` it, which parses a value like `1.` to `1`. Adding the decimal anywhere but the last character will work, so a workaround to trying to type `1.1` would be to type `11`, then insert the decimal between the `1`s.
40
+
41
+
## TODO
42
+
- Remove react-bootstrap dependency (used for tooltips/popovers)
43
+
- Remove react-select dependency (used for dropdown)
44
+
- Allow passing input & select factories instead of using bootstrap/react-select components
function_classCallCheck(instance,Constructor){if(!(instanceinstanceofConstructor)){thrownewTypeError("Cannot call a class as a function");}}
24
+
25
+
function_possibleConstructorReturn(self,call){if(!self){thrownewReferenceError("this hasn't been initialised - super() hasn't been called");}returncall&&(typeofcall==="object"||typeofcall==="function") ? call : self;}
26
+
27
+
function_inherits(subClass,superClass){if(typeofsuperClass!=="function"&&superClass!==null){thrownewTypeError("Super expression must either be null or a function, not "+typeofsuperClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor: {value: subClass,enumerable: false,writable: true,configurable: true}});if(superClass)Object.setPrototypeOf ? Object.setPrototypeOf(subClass,superClass) : subClass.__proto__=superClass;}
0 commit comments