We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

how do i invoke component methods in reactjs?

For example, how do I use refresh for the ejTreeView?


How would I do this with a ReactJS component?

1 Reply

BP Balamurugan P Syncfusion Team February 15, 2017 08:59 AM UTC

Hi Christopher, 
Thanks for using Syncfusion Products.  

In ReactJS, you can call the “refresh” method of TreeView as specified in below code block. 

Code block: 
var DefaultTree = React.createClass({ 
    onRefresh: function (e) { 
              var treeObj = $('#treeview').data("ejTreeView"); 
       onRemove: function(e){ 
              var treeObj = $('#treeview').data("ejTreeView"); 
    render: function () { 
        return (    
        <div id="treeview-default">   
           <EJ.Button id="btnRefresh" size="medium" type="button" height={30} width={150} text="Refresh Tree" click={this.onRefresh}> 
           <EJ.Button id="btnRemove" size="medium" type="button" height={30} width={150} text="Remove Tree" click={this.onRemove}> 
           <EJ.TreeView id="treeview" fields={fields}> 
ReactDOM.render(<DefaultTree />, 

We have prepared a sample based on this and you can find the sample under the following location: 

Currently we have provided getting started details in our RectJS document.  Also, we have planned to update the document with further details in our upcoming release.  

Please let us know if you require any further assistance. 
Balamurugan P 

Live Chat Icon For mobile
Up arrow icon