Skip to content

Commit

Permalink
Show empty custom fields
Browse files Browse the repository at this point in the history
  • Loading branch information
WithoutPants committed Nov 22, 2024
1 parent 53df908 commit afe5899
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions ui/v2.5/src/components/Shared/CustomFields.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const CustomField: React.FC<{ field: string; value: unknown }> = ({
label={field}
value={valueStr}
fullWidth={true}
showEmpty
/>
);
};
Expand Down
4 changes: 3 additions & 1 deletion ui/v2.5/src/components/Shared/DetailItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ interface IDetailItem {
value?: React.ReactNode;
title?: string;
fullWidth?: boolean;
showEmpty?: boolean;
}

export const DetailItem: React.FC<IDetailItem> = ({
Expand All @@ -15,8 +16,9 @@ export const DetailItem: React.FC<IDetailItem> = ({
value,
title,
fullWidth,
showEmpty = false,
}) => {
if (!id || !value || value === "Na") {
if (!id || (!showEmpty && (!value || value === "Na"))) {
return <></>;
}

Expand Down

0 comments on commit afe5899

Please sign in to comment.