{"size": 701, "ext": "js", "max_stars_repo_path": "ajvijs/elements/tree/reacttree.js", "max_stars_repo_name": "reminderr/ajvijs", "max_stars_repo_stars_event_min_datetime": "2020-11-06T09:24:40.000Z", "max_stars_repo_stars_event_max_datetime": "2020-11-06T09:24:40.000Z", "max_issues_repo_path": "ajvijs/elements/tree/reacttree.js", "max_issues_repo_name": "reminderr/ajvijs", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "ajvijs/elements/tree/reacttree.js", "max_forks_repo_name": "reminderr/ajvijs", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 18.4473684211, "max_line_length": 96, "alphanum_fraction": 0.6291012839}
import React, {Component} from "./../../../react"
import {ajvi} from "./../../abstract.js"

class TreeView extends Component {
  
  	constructor(props) {

  		super(props)

  		this.ajvi = new ajvi

  	}

	componentDidMount() {

		if(this.props.store && this.props.fillsource) {
	    	this.ajvi[this.props.store] = this.setStore.bind(this);
	    }

	    this.ajvi.TreeView(this.props, this.props.events);
	    this.ajvi[this.props.name].view.At(this.div);

	}

	store(store, element) {
		store.fill = {
			url: this.props.fillsource,
			response: 'json'
		}
	}

	render() {
		return React.createElement('div', {ref: el => this.div = el, className: 'treecontainer' }, '')
	}

}

export default TreeView