Skip to content

Commit

Permalink
fix(react): bolding field name if single token (datahub-project#3080)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe-lyons authored and Rahul Jain committed Aug 31, 2021
1 parent 81a5dd6 commit 0d160b0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export default function schemaTitleRenderer(fieldPath: string) {
}
}

if (!lastPath) {
return <Typography.Text strong>{firstPath}</Typography.Text>;
}

return (
<span>
<LighterText>{`${firstPath}${lastPath ? '.' : ''}`}</LighterText>
Expand Down

0 comments on commit 0d160b0

Please sign in to comment.