I have one react table with subcomponent, in subcomponent, I am having 2 buttons on click of each button need to show react table, please help me with this.
ex:
class Sample extends React{
firstFun=()=>{
return <ReactTable data={} columns={columns}
}
secondFun=()=>{
return <Reacttable data={} columns={columns}
}
subcompo=()=>{
// some code
<bt1 onclick={this.firstFun}/>
<bt2 onclick={this.secondFun}/>
}
render(){
return(
<ReactTable
data={}
submcomponent={this.subcompo}
/>
)}
}