From 9cadda02364dad6ec1fb6a8fb721230a7e2acd5d Mon Sep 17 00:00:00 2001 From: orangemug Date: Sat, 18 Jan 2020 22:03:29 +0000 Subject: [PATCH] Update react-collapse which was needlessly updating and causing scroll position jump. --- package-lock.json | 9 +++------ package.json | 2 +- src/components/layers/JSONEditor.jsx | 11 ----------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0fc459b..223a485 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9070,12 +9070,9 @@ } }, "react-collapse": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/react-collapse/-/react-collapse-4.0.3.tgz", - "integrity": "sha512-OO4NhtEqFtz+1ma31J1B7+ezdRnzHCZiTGSSd/Pxoks9hxrZYhzFEddeYt05A/1477xTtdrwo7xEa2FLJyWGCQ==", - "requires": { - "prop-types": "^15.5.8" - } + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/react-collapse/-/react-collapse-5.0.1.tgz", + "integrity": "sha512-cN2tkxBWizhPQ2JHfe0aUSJtmMthKA17NZkTElpiQ2snQAAi1hssXZ2fv88rAPNNvG5ss4t0PbOZT0TIl9Lk3Q==" }, "react-color": { "version": "2.17.3", diff --git a/package.json b/package.json index c08f087..a8f02d0 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "react-aria-modal": "^4.0.0", "react-autobind": "^1.0.6", "react-autocomplete": "^1.8.1", - "react-collapse": "^4.0.3", + "react-collapse": "^5.0.1", "react-color": "^2.17.3", "react-dom": "^16.10.2", "react-file-reader-input": "^2.0.0", diff --git a/src/components/layers/JSONEditor.jsx b/src/components/layers/JSONEditor.jsx index a8c0ce5..840e0ad 100644 --- a/src/components/layers/JSONEditor.jsx +++ b/src/components/layers/JSONEditor.jsx @@ -105,17 +105,6 @@ class JSONEditor extends React.Component { } render() { - const codeMirrorOptions = { - mode: {name: "javascript", json: true}, - tabSize: 2, - theme: 'maputnik', - viewportMargin: Infinity, - lineNumbers: true, - lint: true, - gutters: ["CodeMirror-lint-markers"], - scrollbarStyle: "null", - } - const style = {}; if (this.props.maxHeight) { style.maxHeight = this.props.maxHeight;