Added some todo's
This commit is contained in:
parent
1099e3859f
commit
d014146956
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue