Skip to content

Commit 85e4dfd

Browse files
committed
Fix build and Typescript errors
1 parent e4e2be9 commit 85e4dfd

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/grid/RowCol.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FunctionComponent } from 'react';
22
import { getPositionnableCellClassNames, getPositionnablRowClassNames } from './grid-renderer-utils';
3-
import { GridCell, RowColGridProps } from './types';
3+
import { GridRow, GridCell, RowColGridProps } from './types';
44

55
export 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 (

src/grid/Table.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { FunctionComponent } from 'react';
22
import { getPositionnableCellClassNames, getPositionnablRowClassNames } from './grid-renderer-utils';
3-
import { GridCell, TableGridProps } from './types';
3+
import { GridCell, GridRow, TableGridProps } from './types';
44

55
export 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 (

0 commit comments

Comments
 (0)