соот-но в пропсы передать нужно метод родителя
спасибо, большое, немного не верно изложил суть проблемы
у меня есть компонент таблицы
// custom column
const TD = () => <button className="btn btn-sm">Подробнее <i className="icon icon-arrow-right"></i></button>
// вызов
<Table head={table} list={data.data} cls="table-striped table-hover">
<TD head=""/>
</Table>
/
* Table component
*
* @param {Object} head table head
* @param {array} list data list
* @param {string} cls class table
* @param {Object|array} children custom columns
*
* @returns {*}
*
* @constructor
*/
const Table = ({head, list, cls, children}) => (
<table className={'table ' + cls}>
<thead>
<tr>
{Object.keys(head).map((item, i) => {
return <th key={i}>{get(head, item)}</th>
})}
{React.Children.toArray(children).map((item, i) => {
return <th key={i}>{item.props.head}</th>
})}
</tr>
</thead>
<tbody>
{list.map(item => {
return <TableRow key={item.id} cols={head} data={item} >{children}</TableRow>
})}
</tbody>
</table>
)
/
* Component table row
*
* @param {object} cols list cols table
* @param {object} data list data
* @param {Object|array} children children element
*
* @returns {*}
* @constructor
*/
const TableRow = ({cols, data, children}) => (
<tr>
{Object.keys(cols).map((item, i) => {
return <td key={i}>{get(data, item)}</td>
})}
{children}
</tr>
);