Merge pull request #1008 from Hexastack/1007-issue---visual-editor-add-category

fix(frontend): update dialogs types
This commit is contained in:
Med Marrouchi 2025-05-13 14:36:25 +01:00 committed by GitHub
commit ae8ae7ea07
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -205,7 +205,9 @@ export const Languages = () => {
startIcon={<AddIcon />} startIcon={<AddIcon />}
variant="contained" variant="contained"
sx={{ float: "right" }} sx={{ float: "right" }}
onClick={() => dialogs.open(LanguageFormDialog, null)} onClick={() =>
dialogs.open(LanguageFormDialog, { defaultValues: null })
}
> >
{t("button.add")} {t("button.add")}
</Button> </Button>

View File

@ -678,7 +678,7 @@ const Diagrams = () => {
minWidth: "42px", minWidth: "42px",
}} }}
onClick={(e) => { onClick={(e) => {
dialogs.open(CategoryFormDialog, null); dialogs.open(CategoryFormDialog, { defaultValues: null });
e.preventDefault(); e.preventDefault();
}} }}
> >

View File

@ -184,4 +184,4 @@ export type ExtractFormProps<T extends (arg: { data: any }) => unknown> =
export type ComponentFormDialogProps< export type ComponentFormDialogProps<
T extends (arg: { data: any }) => unknown, T extends (arg: { data: any }) => unknown,
> = FormButtonsProps & DialogProps<ExtractFormProps<T> | null, boolean>; > = FormButtonsProps & DialogProps<ExtractFormProps<T>, boolean>;