Skip to content

Commit

Permalink
make sure name is rendered in first position (#21101)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe Reuter authored Jan 6, 2023
1 parent 32f34b4 commit 6c2ee30
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ export function useBuildForm(
if (isDraft) {
return schema;
}
// schema.properties gets defined right above
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
schema.properties!.name = {
type: "string",
title: formatMessage({ id: `form.${formType}Name` }),
description: formatMessage({ id: `form.${formType}Name.message` }),
schema.properties = {
name: {
type: "string",
title: formatMessage({ id: `form.${formType}Name` }),
description: formatMessage({ id: `form.${formType}Name.message` }),
},
...schema.properties,
};
schema.required = ["name"];
return schema;
Expand Down

0 comments on commit 6c2ee30

Please sign in to comment.