Skip to content

Commit

Permalink
fix(VerticalLayout): remove unused group label conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
ashmortar committed Oct 3, 2024
1 parent a406e26 commit ce944d8
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/layouts/VerticalLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LayoutProps, GroupLayout } from "@jsonforms/core"
import { LayoutProps } from "@jsonforms/core"
import { AntDLayout, AntDLayoutProps } from "./LayoutRenderer"
import { Form } from "antd"
import { VerticalLayoutUISchema } from "../ui-schema"
Expand All @@ -13,10 +13,9 @@ export function VerticalLayout({
renderers,
cells,
}: LayoutProps) {
const verticalLayout = uischema as VerticalLayoutUISchema<unknown>
const groupLayout = uischema as GroupLayout
const { elements } = uischema as VerticalLayoutUISchema<unknown>
const childProps: AntDLayoutProps = {
elements: verticalLayout.elements,
elements,
schema,
path,
enabled,
Expand All @@ -25,9 +24,6 @@ export function VerticalLayout({
const form = Form.useFormInstance()
return (
<Form component={form ? false : "form"} scrollToFirstError form={form}>
{!!groupLayout.label && (
<div>{groupLayout.label}</div> // this was SubtitleSemiBold
)}
<AntDLayout {...childProps} renderers={renderers} cells={cells} />
</Form>
)
Expand Down

0 comments on commit ce944d8

Please sign in to comment.