Skip to content

Commit

Permalink
fix: preserve newlines on view object pages
Browse files Browse the repository at this point in the history
  • Loading branch information
alubbock committed Mar 11, 2024
1 parent 5c75f19 commit ca82dca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/crudtemplates/ViewObjectPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ const ViewObjectPage = (props) => {
<dt className="text-sm font-medium text-gray-500">
{field.label}
</dt>
<dd className="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words">
<dd className="mt-1 text-sm text-gray-900 sm:col-span-2 sm:mt-0 break-words whitespace-pre-wrap">
{!loading &&
displayField(field, record, "ViewObjectPage", {
setRecord: setRecord,
Expand Down
4 changes: 3 additions & 1 deletion frontend/src/crudtemplates/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,9 @@ export const displayField = (field, record, context, props) => {
x
) : (
<>
{acc} <br /> {x}
{acc}
<br />
{x}
</>
),
null,
Expand Down

0 comments on commit ca82dca

Please sign in to comment.