Skip to content

Commit

Permalink
Upgrade of react-jsonschema-form to @rjsf/core
Browse files Browse the repository at this point in the history
  • Loading branch information
mapcentia committed Dec 14, 2021
1 parent c43171e commit 9801018
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 39 deletions.
10 changes: 7 additions & 3 deletions extensions/editor/browser/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ let apiBridgeInstance = false;

let multiply = require('geojson-multiply');

let JSONSchemaForm = require("react-jsonschema-form");

let Form = JSONSchemaForm.default;
import Form from "@rjsf/core";

let markers = [];

Expand Down Expand Up @@ -284,6 +282,7 @@ module.exports = {
}

if (fields[key]) {
console.log(fields[key].type)
switch (fields[key].type) {
case `smallint`:
case `integer`:
Expand All @@ -296,6 +295,11 @@ module.exports = {
case `double precision`:
properties[key].type = `number`;
break;
// case `time without time zone`:
// uiSchema[key] = {
// 'ui:widget': 'time'
// };
// break;
case `date`:
uiSchema[key] = {
'ui:widget': 'date'
Expand Down
126 changes: 91 additions & 35 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
"dependencies": {
"@material-ui/core": "^3.9.4",
"@material-ui/icons": "^3.0.2",
"@rjsf/core": "^3.2.1",
"adm-zip": "^0.5.0",
"array-move": "^2.2.2",
"arrive": "^2.3.1",
Expand Down Expand Up @@ -151,7 +152,6 @@
"react-datetime": "^2.16.3",
"react-dom": "^16.13.1",
"react-dropzone": "^5.1.0",
"react-jsonschema-form": "^1.8.1",
"react-plotly.js": "^2.4.0",
"react-router": "^4.3.1",
"react-router-redux": "^4.0.8",
Expand Down

0 comments on commit 9801018

Please sign in to comment.