Don't display "Comment" field in details if it is empty

This commit is contained in:
Deluan
2020-11-12 22:01:59 -05:00
parent b3f373cdb4
commit 153cf8f5af
2 changed files with 6 additions and 1 deletions
+3 -1
View File
@@ -40,7 +40,9 @@ const AlbumDetails = (props) => {
<BooleanField source="compilation" />
<DateField source="updatedAt" showTime />
<SizeField source="size" />
<MultiLineTextField source="comment" />
{props.record && props.record['comment'] && (
<MultiLineTextField source="comment" />
)}
</SimpleShowLayout>
</Show>
)