-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Slug validation on update deployment #15
Conversation
apps/webservice/src/app/[workspaceSlug]/_components/EditDeploymentDialog.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/_components/EditDeploymentDialog.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/systems/[systemSlug]/deployments/page.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/_components/CreateDeployment.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/_components/CreateDeployment.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/_components/CreateDeployment.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/_components/CreateDeployment.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/_components/CreateDeployment.tsx
Outdated
Show resolved
Hide resolved
apps/webservice/src/app/[workspaceSlug]/_components/EditDeploymentDialog.tsx
Outdated
Show resolved
Hide resolved
const onSubmit = form.handleSubmit(async (data) => { | ||
await create.mutateAsync(data); | ||
router.push(`/${data.slug}`); | ||
watch((data, { name: fieldName }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you need to call this inside a useEffect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will look into this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think so, but I don't know 100% why.
I read the doc and it looks like it should be used with useffect if you want to watch specific fields, but we are using it in a "field array" populated by the form type.
They also show useFieldArray to add and remove items from the form, but I'm not doing that in this case. Our form is relatively more simple.
No description provided.