import React from 'react'; import { withHeader } from './with-header'; import { TableCell } from '../elements'; import { FlexTable } from '../..'; export const CustomColumn = withHeader(({ item, onRender, children, onAction, cellClassName, hideHeader, ...attrs }: FlexTable.CustomColumnProps) => { const className = (cellClassName && typeof cellClassName === 'function') ? cellClassName(item) : cellClassName; const onClickTableCell: React.MouseEventHandler = event => (onAction && onAction(item, event)); return ( { item && onRender(item)} ) });