File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 11import { FunctionComponent } from 'react' ;
22import { getPositionnableCellClassNames , getPositionnablRowClassNames } from './grid-renderer-utils' ;
3- import { GridCell , RowColGridProps } from './types' ;
3+ import { GridRow , GridCell , RowColGridProps } from './types' ;
44
55export const RowCol : FunctionComponent < RowColGridProps > = ( {
66 cellComponent,
@@ -15,7 +15,7 @@ export const RowCol: FunctionComponent<RowColGridProps> = ({
1515 < div className = "crystallize-grid crystallize-row-col-table" { ...props } >
1616 { children && children ( { grid, dimensions } ) }
1717 { ! children &&
18- grid . map ( ( row : GridCell [ ] , rowIndex : number ) => {
18+ grid . map ( ( row : GridRow , rowIndex : number ) => {
1919 return (
2020 < div
2121 key = { `row-${ rowIndex } ` }
@@ -24,7 +24,7 @@ export const RowCol: FunctionComponent<RowColGridProps> = ({
2424 dimensions ,
2525 ) } `}
2626 >
27- { row . map ( ( cell : GridCell , cellIndex : number ) => {
27+ { row . columns . map ( ( cell : GridCell , cellIndex : number ) => {
2828 const cellStyles = styleForCell ? styleForCell ( cell , { } ) || { } : { } ;
2929 const classes = getPositionnableCellClassNames ( cell , dimensions ) ;
3030 return (
Original file line number Diff line number Diff line change 11import { FunctionComponent } from 'react' ;
22import { getPositionnableCellClassNames , getPositionnablRowClassNames } from './grid-renderer-utils' ;
3- import { GridCell , TableGridProps } from './types' ;
3+ import { GridCell , GridRow , TableGridProps } from './types' ;
44
55export const Table : FunctionComponent < TableGridProps > = ( {
66 cellComponent,
@@ -23,13 +23,13 @@ export const Table: FunctionComponent<TableGridProps> = ({
2323 < tbody >
2424 { children && children ( { grid, dimensions } ) }
2525 { ! children &&
26- grid . map ( ( row : GridCell [ ] , rowIndex : number ) => {
26+ grid . map ( ( row : GridRow , rowIndex : number ) => {
2727 return (
2828 < tr
2929 key = { `row-${ rowIndex } ` }
3030 className = { getPositionnablRowClassNames ( { rowIndex } , dimensions ) }
3131 >
32- { row . map ( ( cell : GridCell , cellIndex : number ) => {
32+ { row . columns . map ( ( cell : GridCell , cellIndex : number ) => {
3333 const cellStyles = styleForCell ? styleForCell ( cell , { } ) || { } : { } ;
3434 const classes = getPositionnableCellClassNames ( cell , dimensions ) ;
3535 return (
You can’t perform that action at this time.
0 commit comments