react-data-grid-temp
Advanced tools
Comparing version 7.0.0-canary.22.5 to 7.0.0-canary.22.6
@@ -66,10 +66,25 @@ var __assign = (this && this.__assign) || function () { | ||
} | ||
var renderFormatter = function () { | ||
if (column.render) { | ||
return (React.createElement(React.Fragment, null, !column.rowGroup && (React.createElement(React.Fragment, null, | ||
column.render({ | ||
column: column, | ||
rowIdx: rowIdx, | ||
row: row, | ||
isCellSelected: isCellSelected, | ||
isRowSelected: isRowSelected, | ||
onRowSelectionChange: onRowSelectionChange | ||
}), | ||
dragHandleProps && (React.createElement("div", __assign({ className: "rdg-cell-drag-handle" }, dragHandleProps))))))); | ||
} | ||
return (React.createElement(React.Fragment, null, !column.rowGroup && (React.createElement(React.Fragment, null, | ||
React.createElement(column.formatter, { column: column, rowIdx: rowIdx, row: row, isCellSelected: isCellSelected, isRowSelected: isRowSelected, onRowSelectionChange: onRowSelectionChange }), | ||
dragHandleProps && (React.createElement("div", __assign({ className: "rdg-cell-drag-handle" }, dragHandleProps))))))); | ||
}; | ||
return (React.createElement("div", __assign({ role: "gridcell", "aria-colindex": column.idx + 1, "aria-selected": isCellSelected, ref: useCombinedRefs(cellRef, ref), className: className, style: { | ||
width: column.width, | ||
left: column.left | ||
}, onFocus: onFocus, onKeyDown: onKeyDown, onClick: wrapEvent(handleClick, onClick), onDoubleClick: wrapEvent(handleDoubleClick, onDoubleClick), onContextMenu: wrapEvent(handleContextMenu, onContextMenu) }, props), !column.rowGroup && (React.createElement(React.Fragment, null, | ||
React.createElement(column.formatter, { column: column, rowIdx: rowIdx, row: row, isCellSelected: isCellSelected, isRowSelected: isRowSelected, onRowSelectionChange: onRowSelectionChange }), | ||
dragHandleProps && (React.createElement("div", __assign({ className: "rdg-cell-drag-handle" }, dragHandleProps))))))); | ||
}, onFocus: onFocus, onKeyDown: onKeyDown, onClick: wrapEvent(handleClick, onClick), onDoubleClick: wrapEvent(handleDoubleClick, onDoubleClick), onContextMenu: wrapEvent(handleContextMenu, onContextMenu) }, props), renderFormatter())); | ||
} | ||
export default memo(forwardRef(Cell)); | ||
//# sourceMappingURL=Cell.js.map |
@@ -1,2 +0,2 @@ | ||
import { KeyboardEvent } from 'react'; | ||
import { KeyboardEvent, ReactNode } from 'react'; | ||
import { UpdateActions, SortDirection } from './enums'; | ||
@@ -62,2 +62,3 @@ import EventBus from './EventBus'; | ||
formatter: React.ComponentType<FormatterProps<TRow, TSummaryRow>>; | ||
render?: (data: FormatterProps<TRow, TSummaryRow>) => ReactNode; | ||
} | ||
@@ -64,0 +65,0 @@ export interface Position { |
{ | ||
"name": "react-data-grid-temp", | ||
"version": "7.0.0-canary.22.5", | ||
"version": "7.0.0-canary.22.6", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Excel-like grid component built with React, with editors, keyboard navigation, copy & paste, and the like", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
338991
3045