Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

DEVPROD-789: Fix spacing bug in ArrayFieldTemplate #2170

Merged
merged 1 commit into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,22 @@ export const ArrayFieldTemplate: React.FC<ArrayFieldTemplateProps> = ({
hasChildren={!!items?.length}
data-cy={arrayDataCy}
>
{items.length === 0 ? (
{items.length === 0 && placeholder && (
<Placeholder>{placeholder}</Placeholder>
) : (
items.map((p, i) => (
<ArrayItem
{...p}
key={p.key}
border={border}
title={
formData?.[i]?.displayTitle ??
uiSchema?.items?.["ui:displayTitle"]
}
topAlignDelete={topAlignDelete}
useExpandableCard={useExpandableCard}
/>
))
)}
{items.map((p, i) => (
<ArrayItem
{...p}
key={p.key}
border={border}
title={
formData?.[i]?.displayTitle ??
uiSchema?.items?.["ui:displayTitle"]
}
topAlignDelete={topAlignDelete}
useExpandableCard={useExpandableCard}
/>
))}
{buttonAtEnd && (
<AddButtonContainer>
{addButton}
Expand Down
4 changes: 4 additions & 0 deletions src/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1692,6 +1692,7 @@ export type Project = {
repotrackerError?: Maybe<RepotrackerError>;
restricted?: Maybe<Scalars["Boolean"]["output"]>;
spawnHostScriptPath: Scalars["String"]["output"];
stepbackBisect?: Maybe<Scalars["Boolean"]["output"]>;
stepbackDisabled?: Maybe<Scalars["Boolean"]["output"]>;
taskAnnotationSettings: TaskAnnotationSettings;
taskSync: TaskSyncOptions;
Expand Down Expand Up @@ -1824,6 +1825,7 @@ export type ProjectInput = {
repotrackerDisabled?: InputMaybe<Scalars["Boolean"]["input"]>;
restricted?: InputMaybe<Scalars["Boolean"]["input"]>;
spawnHostScriptPath?: InputMaybe<Scalars["String"]["input"]>;
stepbackBisect?: InputMaybe<Scalars["Boolean"]["input"]>;
stepbackDisabled?: InputMaybe<Scalars["Boolean"]["input"]>;
taskAnnotationSettings?: InputMaybe<TaskAnnotationSettingsInput>;
taskSync?: InputMaybe<TaskSyncOptionsInput>;
Expand Down Expand Up @@ -2144,6 +2146,7 @@ export type RepoRef = {
repotrackerDisabled: Scalars["Boolean"]["output"];
restricted: Scalars["Boolean"]["output"];
spawnHostScriptPath: Scalars["String"]["output"];
stepbackBisect?: Maybe<Scalars["Boolean"]["output"]>;
stepbackDisabled: Scalars["Boolean"]["output"];
taskAnnotationSettings: TaskAnnotationSettings;
taskSync: RepoTaskSyncOptions;
Expand Down Expand Up @@ -2186,6 +2189,7 @@ export type RepoRefInput = {
repotrackerDisabled?: InputMaybe<Scalars["Boolean"]["input"]>;
restricted?: InputMaybe<Scalars["Boolean"]["input"]>;
spawnHostScriptPath?: InputMaybe<Scalars["String"]["input"]>;
stepbackBisect?: InputMaybe<Scalars["Boolean"]["input"]>;
stepbackDisabled?: InputMaybe<Scalars["Boolean"]["input"]>;
taskAnnotationSettings?: InputMaybe<TaskAnnotationSettingsInput>;
taskSync?: InputMaybe<TaskSyncOptionsInput>;
Expand Down