javascript - Passing a Data on every click to another component -


i have table in main page lets main.js, want every click in row of table want display data in drawer. knows how achieve this?.

here's main.js:

       <table multiselectable={this.state.multiselectable} onrowselection={this.rowselection}>           <tableheader>             <tablerow>               <tableheadercolumn style={tablestyles.columns.id}>id</tableheadercolumn>               <tableheadercolumn style={tablestyles.columns.name}>name</tableheadercolumn>               <tableheadercolumn style={tablestyles.columns.price}>price</tableheadercolumn>               <tableheadercolumn style={tablestyles.columns.category}>category</tableheadercolumn>               <tableheadercolumn style={tablestyles.columns.edit}>edit</tableheadercolumn>             </tablerow>           </tableheader>           <tablebody>             {data.tablepage.items.map(item =>               <tablerow key={item.id}>                 <tablerowcolumn style={tablestyles.columns.id}>{item.id}</tablerowcolumn>                 <tablerowcolumn style={tablestyles.columns.name}>{item.name}</tablerowcolumn>                 <tablerowcolumn style={tablestyles.columns.price}>{item.price}</tablerowcolumn>                 <tablerowcolumn style={tablestyles.columns.category}>{item.category}</tablerowcolumn>                 <tablerowcolumn style={tablestyles.columns.edit}>                   <link classname="button" to="/form">                     <floatingactionbutton zdepth={0} mini backgroundcolor={grey200} iconstyle={tablestyles.editbutton}>                       <contentcreate />                     </floatingactionbutton>                   </link>                 </tablerowcolumn>               </tablerow>             )}           </tablebody> 

and here's drawer.js:

<paper style={papers} zdepth={5}> {this.props.onrowselection} </paper> 

but doesn't show , no error too. did wrong?


Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -