Skip to content

Commit

Permalink
fix(CriteriaForm): edit criteria form shouldnt have render trigger prop
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisVorop committed Oct 6, 2023
1 parent 27a78d1 commit 717331d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/components/CriteriaForm/CriteriaForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ interface CriteriaFormProps {
sum: number;
title: string[];
};
renderTrigger: React.ComponentProps<typeof InlineForm>['renderTrigger'];
renderTrigger?: React.ComponentProps<typeof InlineForm>['renderTrigger'];
}
interface CriteriaFormPropsWithSchema extends CriteriaFormProps {
schema: Zod.Schema;
Expand Down Expand Up @@ -324,7 +324,7 @@ export const AddCriteriaForm: React.FC<
};

export const EditCriteriaForm: React.FC<
Omit<CriteriaFormProps, 'renderTrigger'> & {
CriteriaFormProps & {
values: z.infer<typeof updateCriteriaSchema>;
onSubmit: (val: z.infer<typeof updateCriteriaSchema>) => void;
}
Expand All @@ -338,7 +338,6 @@ export const EditCriteriaForm: React.FC<
onReset={onReset}
validityData={validityData}
values={values}
renderTrigger={() => null}
/>
);
};

0 comments on commit 717331d

Please sign in to comment.