From 4a2ac5136e2997fca532bd52a31d4bd48bfeb6ae Mon Sep 17 00:00:00 2001 From: Chris Read Date: Fri, 30 Oct 2020 12:15:03 +1000 Subject: [PATCH 1/2] Add the title tag to the Array () definition within a schema block --- src/components/Schema/ArraySchema.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/Schema/ArraySchema.tsx b/src/components/Schema/ArraySchema.tsx index 48e7dc4135..2d33cabca5 100644 --- a/src/components/Schema/ArraySchema.tsx +++ b/src/components/Schema/ArraySchema.tsx @@ -5,6 +5,7 @@ import { Schema, SchemaProps } from './Schema'; import { ArrayClosingLabel, ArrayOpenningLabel } from '../../common-elements'; import styled from '../../styled-components'; import {humanizeConstraints} from "../../utils"; +import { TypeTitle } from '../../common-elements/fields'; const PaddedSchema = styled.div` padding-left: ${({ theme }) => theme.spacing.unit * 2}px; @@ -23,6 +24,7 @@ export class ArraySchema extends React.PureComponent { return (
Array ({minMaxItems}) + {itemsSchema.schema.title} From 84448ff411f473c7b38849ab1004af9aba63f711 Mon Sep 17 00:00:00 2001 From: Chris Read Date: Mon, 9 Nov 2020 14:23:32 +1000 Subject: [PATCH 2/2] Only show the title block if the title tag exists --- src/components/Schema/ArraySchema.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Schema/ArraySchema.tsx b/src/components/Schema/ArraySchema.tsx index 2d33cabca5..aa57fd83d2 100644 --- a/src/components/Schema/ArraySchema.tsx +++ b/src/components/Schema/ArraySchema.tsx @@ -24,7 +24,7 @@ export class ArraySchema extends React.PureComponent { return (
Array ({minMaxItems}) - {itemsSchema.schema.title} + {itemsSchema.schema.title && {itemsSchema.schema.title} }