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

Commit

Permalink
DEVPROD-789: Fix spacing bug in ArrayFieldTemplate (#2170)
Browse files Browse the repository at this point in the history
  • Loading branch information
minnakt authored Nov 28, 2023
1 parent 1a03b39 commit dfda0a8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
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

0 comments on commit dfda0a8

Please sign in to comment.