Skip to content

Commit

Permalink
Fix cellTable
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnDuprey committed Apr 11, 2024
1 parent bad4bf3 commit 51adb04
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions src/components/tables/CellTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ export default function cellTable(
) {
columnProp = Object.keys(columnProp).map((key) => {
return {
[key]: columnProp[key],
}
})
}

if (Array.isArray(columnProp) && typeof columnProp[0] !== 'object') {
columnProp = columnProp.map((row) => {
return {
Value: row,
Key: key,
Value: columnProp[key],
}
})
} else {
if (Array.isArray(columnProp) && typeof columnProp[0] !== 'object') {
columnProp = columnProp.map((row) => {
return {
Value: row,
}
})
}
}

const handleTable = ({ columnProp }) => {
Expand Down

0 comments on commit 51adb04

Please sign in to comment.