Skip to content

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.

[#1497] fix(UI): Fix newline character in the `comment` field (#1504)

CHEYNEbaf0ba6b99fb
diff --git a/web/app/(home)/DetailsDrawer.js b/web/app/(home)/DetailsDrawer.js
index b62da64922..517d79f480 100644
--- a/web/app/(home)/DetailsDrawer.js
+++ b/web/app/(home)/DetailsDrawer.js
@@ -93,7 +93,7 @@ const DetailsDrawer = props => {
<Typography variant='body2' sx={{ mb: 2 }}>
Comment
</Typography>
- <Typography sx={{ fontWeight: 500 }}>{drawerData.comment}</Typography>
+ <Typography sx={{ fontWeight: 500, whiteSpace: 'pre' }}>{drawerData.comment}</Typography>
</Grid>
<Grid item xs={12} sx={{ mb: [0, 5] }}>
diff --git a/web/app/metalakes/DetailsView.js b/web/app/metalakes/DetailsView.js
index a51006c959..5e9bfc21eb 100644
--- a/web/app/metalakes/DetailsView.js
+++ b/web/app/metalakes/DetailsView.js
@@ -29,6 +29,8 @@ const DetailsView = props => {
}
})
+ console.log(activatedItem)
+
return (
<Box sx={{ p: 4 }}>
<Grid container spacing={6}>
@@ -52,7 +54,7 @@ const DetailsView = props => {
<Typography variant='body2' sx={{ mb: 2 }}>
Comment
</Typography>
- <Typography sx={{ fontWeight: 500 }}>{activatedItem?.comment || ''}</Typography>
+ <Typography sx={{ fontWeight: 500, whiteSpace: 'pre' }}>{activatedItem?.comment || ''}</Typography>
</Grid>
<Grid item xs={12} md={6} sx={{ mb: [0, 5] }}>