Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 25 additions & 10 deletions src/panelTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const PanelTable = ({
}, [collapseAll]);

let value = fieldsValues ? get(fieldsValues, name) : '';
let isValueWrappedInPre = false;

if (!isUndefined(value)) {
if (isObject(value)) {
Expand All @@ -51,6 +52,7 @@ const PanelTable = ({
</code>
</pre>
);
isValueWrappedInPre = true;
} catch {
value = <span>[Nested Object]</span>;
}
Expand Down Expand Up @@ -235,16 +237,29 @@ const PanelTable = ({
...paraGraphDefaultStyle,
}}
>
<p
title={value}
style={{
...paraGraphDefaultStyle,
margin: 0,
padding: 0,
}}
>
{value}
</p>
{!isValueWrappedInPre && (
<p
title={value}
style={{
...paraGraphDefaultStyle,
margin: 0,
padding: 0,
}}
>
{value}
</p>
)}
{isValueWrappedInPre && (
<div
style={{
...paraGraphDefaultStyle,
margin: 0,
padding: 0,
}}
>
{value}
</div>
)}
</td>
</tr>
)}
Expand Down