Custom Fields using Controller Props are not working in BoxedShowLayout
yash-zorp opened this issue · comments
Yash - Zorp commented
<ShowController {...props} component="div">
{(controllerProps) =>
<ShowView {...props} actions={<TaskShowActions />} {...controllerProps}>
<BoxedShowLayout>
<RaBox display="flex">
<RaBox
display="flex"
flexWrap="wrap"
flexGrow={4}
className={classes.detailsBox}
>
<RaBox
flex="0 0 100%"
display="flex"
justifyContent="space-between"
>
<TextField label="Task Id" source="taskId" />
<TextField
label="Task Type"
source="taskTypeDisplayName"
/>
{controllerProps.record &&
controllerProps.record.taskType ===
"order_management_task" && (
<TextField
label="Customer Name"
source="customerName"
/>
)}
{controllerProps.record &&
controllerProps.record.taskType ===
"order_management_task" && (
<TextField label="Phone Number" source="phone" />
)}
</RaBox>
</RaBox>
</RaBox>
</BoxedShowLayout>
</ShowView>
}
</ShowController>
TypeError: Cannot read property 'source' of undefined