Skip to content

Commit

Permalink
Output union values in Detail panel/window
Browse files Browse the repository at this point in the history
  • Loading branch information
philrz committed Jun 18, 2024
1 parent b4ed51d commit a19cc23
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion apps/zui/src/views/detail-pane/Fields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ const DataPanel = React.memo<DTProps>(function DataTable({
<Data key={index}>
<Name>{field.path.join(" ‣ ")}</Name>
<Value className={zedTypeClassName(field.data)}>
{format(field.data as zed.Primitive)}
{field.data instanceof zed.Union
? format(field.data.value as zed.Primitive)
: format(field.data as zed.Primitive)}
</Value>
</Data>
))}
Expand Down

0 comments on commit a19cc23

Please sign in to comment.