UNPKG

fixed-react-data-grid-custom

Version:

Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like

17 lines (14 loc) 373 B
export const createColumn = (index, props) => { const key = `Column${index}`; return { key, name: key, Id: index, editable: true, getRowMetaData: () => [], width: 100, left: 100 * index, ...props }; }; export const createColumns = (count) => Array.apply(null, { length: count }).map(Function.call, Number).map(i => createColumn(i));