function toColumns({ id, theme, children, columnsWidths, getRowState }) {
	return React.Children.toArray(children).map((field, index) => {
		const columnWidth = getColumnWidth(field.props.dataKey, columnsWidths);
		const colClassName = `tc-list-cell-${field.props.dataKey}`;
		const colProps = {
			// ...createColumnWidthProps(columnWidth),
			width: -1,
			...field.props,
			headerClassName: classNames(field.props.headerClassName, theme.header, colClassName, {
				'tc-header-resizable': columnWidth && columnWidth.resizable,
			}),
			className: classNames(field.props.className, theme.cell, colClassName),
			columnData:
				typeof field.props.columnData === 'function'
					? rowData => ({ ...field.props.columnData(rowData), getRowState, id })
					: {
							...field.props.columnData,
							getRowState,
							id,
					  },
			...createColumnWidthProps(columnWidth),
		};
		return <Column key={index} {...colProps} />;
	});
}
/**
 * Create new Columns from children, enhanced with
 * - header and row fixed classnames
 * - parent id (via columnData)
 */
Create new Columns from children, enhanced with
- header and row fixed classnames
- parent id (via columnData)
Create new Columns from children enhanced with - header and row fixed classnames - parent id ( via columnData )
function toColumns({ id, theme, children, columnsWidths, getRowState }) {
	return React.Children.toArray(children).map((field, index) => {
		const columnWidth = getColumnWidth(field.props.dataKey, columnsWidths);
		const colClassName = `tc-list-cell-${field.props.dataKey}`;
		const colProps = {
			width: -1,
			...field.props,
			headerClassName: classNames(field.props.headerClassName, theme.header, colClassName, {
				'tc-header-resizable': columnWidth && columnWidth.resizable,
			}),
			className: classNames(field.props.className, theme.cell, colClassName),
			columnData:
				typeof field.props.columnData === 'function'
					? rowData => ({ ...field.props.columnData(rowData), getRowState, id })
					: {
							...field.props.columnData,
							getRowState,
							id,
					  },
			...createColumnWidthProps(columnWidth),
		};
		return <Column key={index} {...colProps} />;
	});
}
function toColumns ( { id , theme , children , columnsWidths , getRowState } ) { return React . Children . toArray ( children ) . map ( ( field , index ) => { const columnWidth = getColumnWidth ( field . props . dataKey , columnsWidths ) ; const colClassName = ` ${ field . props . dataKey } ` ; const colProps = { width : - 1 , ... field . props , headerClassName : classNames ( field . props . headerClassName , theme . header , colClassName , { 'tc-header-resizable' : columnWidth && columnWidth . resizable , } ) , className : classNames ( field . props . className , theme . cell , colClassName ) , columnData : typeof field . props . columnData === 'function' ? rowData => ( { ... field . props . columnData ( rowData ) , getRowState , id } ) : { ... field . props . columnData , getRowState , id , } , ... createColumnWidthProps ( columnWidth ) , } ; return < Column key = { index } { ... colProps } / > ; } ) ; }
Create new Columns from children, enhanced with
 - header and row fixed classnames
 - parent id (via columnData)
Create new Columns from children enhanced with - header and row fixed classnames - parent id ( via columnData )
// ...createColumnWidthProps(columnWidth),