Skip to content

Commit

Permalink
fixed to handle objects without properties
Browse files Browse the repository at this point in the history
  • Loading branch information
sarahtrefethen committed Oct 19, 2020
1 parent a6ad666 commit bd49883
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/material/src/complex/MaterialTableControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,15 @@ const generateCells = (
) => {
if (schema.type === 'object') {
return getValidColumnProps(schema).map(prop => {
let title = prop;
// if (schema.properties && schema.properties[prop].title) {
// title = schema.properties[prop].title;
// }
const cellPath = Paths.compose(rowPath, prop);
const props = {
propName: prop,
schema,
title: schema.properties[prop].title ? schema.properties[prop].title : startCase(prop),
title,
rowPath,
cellPath,
enabled,
Expand Down

0 comments on commit bd49883

Please sign in to comment.