Skip to content

Commit 8ee1de8

Browse files
authored
Merge pull request #43 from workfloworchestrator/1719-labels-fix
1719: Hides form title if its "unknown"
2 parents abbe975 + 9b0d4a3 commit 8ee1de8

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'pydantic-forms': patch
3+
---
4+
5+
Hides form title if it's "unknown"

frontend/packages/pydantic-forms/src/components/render/RenderForm.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ const RenderForm = (contextProps: PydanticFormContextProps) => {
6767

6868
return (
6969
<form action={''} onSubmit={submitForm}>
70-
{title !== false && title !== 'undefined' && (
71-
<h2>{title ?? pydanticFormSchema.title}</h2>
72-
)}
70+
{title !== false &&
71+
title !== 'undefined' &&
72+
title !== 'unknown' && (
73+
<h2>{title ?? pydanticFormSchema.title}</h2>
74+
)}
7375

7476
{headerComponent}
7577

0 commit comments

Comments
 (0)