fix saving issue (#5328)
Co-authored-by: CarinaWolli <wollencarina@gmail.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
CarinaWolli
kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
parent
f34d6e3c17
commit
0959cf7cd5
@@ -40,7 +40,7 @@ export const TimeTimeUnitInput = (props: Props) => {
|
||||
<div>
|
||||
<Dropdown>
|
||||
<DropdownMenuTrigger asChild>
|
||||
<button className="-ml-1 h-9 w-24 rounded-r-md border border-gray-300 bg-gray-50 px-3 py-1 text-sm">
|
||||
<button className="-ml-1 h-9 w-24 rounded-none rounded-r-md border border-gray-300 bg-gray-50 px-3 py-1 text-sm">
|
||||
<div className="flex">
|
||||
<div className="w-3/4">
|
||||
{timeUnit ? t(`${timeUnit.toLowerCase()}_timeUnit`) : "undefined"}{" "}
|
||||
|
||||
@@ -85,13 +85,12 @@ function WorkflowPage() {
|
||||
data: workflow,
|
||||
isError,
|
||||
error,
|
||||
dataUpdatedAt,
|
||||
} = trpc.useQuery(["viewer.workflows.get", { id: +workflowId }], {
|
||||
enabled: router.isReady && !!workflowId,
|
||||
});
|
||||
|
||||
useEffect(() => {
|
||||
if (workflow && !form.getValues("trigger")) {
|
||||
if (workflow) {
|
||||
setSelectedEventTypes(
|
||||
workflow.activeOn.map((active) => ({
|
||||
value: String(active.eventType.id),
|
||||
@@ -131,7 +130,7 @@ function WorkflowPage() {
|
||||
form.setValue("activeOn", activeOn || []);
|
||||
setIsAllDataLoaded(true);
|
||||
}
|
||||
}, [dataUpdatedAt]);
|
||||
}, [workflow]);
|
||||
|
||||
const updateMutation = trpc.useMutation("viewer.workflows.update", {
|
||||
onSuccess: async ({ workflow }) => {
|
||||
|
||||
Reference in New Issue
Block a user