Skip to content

Commit

Permalink
fix(app-tenant-manager): add graphql selection to update mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel910 committed May 16, 2024
1 parent 5046357 commit 4ae6672
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ export const AddTenantFormField = memo(function AddTenantFormField({
selectionPath={"tenancy.createTenant.data"}
addSelection={querySelection}
/>
<AddGraphQLQuerySelection
operationName={"UpdateTenant"}
selectionPath={"tenancy.updateTenant.data"}
addSelection={querySelection}
/>
<Compose component={TenantFormFields} with={FieldHOC} />
</Fragment>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const TenantForm = () => {
}

return (
<Form data={{ tags: [], ...tenant }} onSubmit={onSubmit}>
<Form data={{ ...tenant }} onSubmit={onSubmit}>
{({ data, form, Bind }) => (
<SimpleForm data-testid={"tenant-form"}>
{loading && <CircularProgress />}
Expand All @@ -57,7 +57,11 @@ const TenantForm = () => {
</Bind>
</Cell>
<Cell span={12}>
<Bind name="tags" validators={validation.create("required")}>
<Bind
name="tags"
validators={validation.create("required")}
defaultValue={[]}
>
<Tags label={"Tags"} />
</Bind>
</Cell>
Expand Down

0 comments on commit 4ae6672

Please sign in to comment.