From d014146956684b02de57174ea0a489213a2ae25f Mon Sep 17 00:00:00 2001 From: jos Date: Fri, 12 Aug 2016 13:47:35 +0200 Subject: [PATCH] Added some todo's --- src/JSONEditor.js | 20 ++------------------ src/TreeMode.js | 3 ++- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/src/JSONEditor.js b/src/JSONEditor.js index 997e02b..650358f 100644 --- a/src/JSONEditor.js +++ b/src/JSONEditor.js @@ -19,7 +19,6 @@ export default class JSONEditor extends Component { render () { return h(TreeMode, { - ref: 'tree-mode', options: this.state.options, data: this.state.data }, []) @@ -31,16 +30,7 @@ export default class JSONEditor extends Component { * @param {SetOptions} [options] */ set (json, options = {}) { - if (this.refs['tree-mode']) { - this.refs['tree-mode'].set(json, options) - } - else { - // not yet rendered - this.setState({ - data: json, - options - }) - } + // TODO: set state via redux action } /** @@ -48,12 +38,6 @@ export default class JSONEditor extends Component { * @returns {Object | Array | string | number | boolean | null} json */ get () { - if (this.refs['tree-mode']) { - return this.refs['tree-mode'].get() - } - else { - // not yet rendered - return this.state.data - } + // TODO: get state from redux store } } \ No newline at end of file diff --git a/src/TreeMode.js b/src/TreeMode.js index bc2b3aa..cb37f72 100644 --- a/src/TreeMode.js +++ b/src/TreeMode.js @@ -298,7 +298,8 @@ export default class TreeMode extends Component { return dataToJson(this.state.data) } - // TODO: create getText and setText + // TODO: implement expand + // TODO: implement getText and setText /** * Default function to determine whether or not to expand a node initially