fix(striker-ui): expose form dialog props in crud list
This commit is contained in:
parent
fcfb410a97
commit
f4da1e8d14
@ -25,6 +25,7 @@ const CrudList = <
|
|||||||
addHeader: rAddHeader,
|
addHeader: rAddHeader,
|
||||||
editHeader: rEditHeader,
|
editHeader: rEditHeader,
|
||||||
entriesUrl,
|
entriesUrl,
|
||||||
|
formDialogProps,
|
||||||
getAddLoading,
|
getAddLoading,
|
||||||
getDeleteErrorMessage,
|
getDeleteErrorMessage,
|
||||||
getDeleteHeader,
|
getDeleteHeader,
|
||||||
@ -184,6 +185,8 @@ const CrudList = <
|
|||||||
loading={getAddLoading?.call(null)}
|
loading={getAddLoading?.call(null)}
|
||||||
ref={addDialogRef}
|
ref={addDialogRef}
|
||||||
showClose
|
showClose
|
||||||
|
{...formDialogProps?.common}
|
||||||
|
{...formDialogProps?.add}
|
||||||
>
|
>
|
||||||
{renderAddForm(formTools)}
|
{renderAddForm(formTools)}
|
||||||
</DialogWithHeader>
|
</DialogWithHeader>
|
||||||
@ -192,6 +195,8 @@ const CrudList = <
|
|||||||
loading={getEditLoading(loadingEntry)}
|
loading={getEditLoading(loadingEntry)}
|
||||||
ref={editDialogRef}
|
ref={editDialogRef}
|
||||||
showClose
|
showClose
|
||||||
|
{...formDialogProps?.common}
|
||||||
|
{...formDialogProps?.edit}
|
||||||
>
|
>
|
||||||
{renderEditForm(formTools, entry)}
|
{renderEditForm(formTools, entry)}
|
||||||
</DialogWithHeader>
|
</DialogWithHeader>
|
||||||
|
3
striker-ui/types/CrudList.d.ts
vendored
3
striker-ui/types/CrudList.d.ts
vendored
@ -25,6 +25,9 @@ type DeletePromiseChainGetter<T> = (
|
|||||||
|
|
||||||
type CrudListOptionalProps<Overview> = {
|
type CrudListOptionalProps<Overview> = {
|
||||||
entryUrlPrefix?: string;
|
entryUrlPrefix?: string;
|
||||||
|
formDialogProps?: Partial<
|
||||||
|
Record<'add' | 'common' | 'edit', Partial<DialogWithHeaderProps>>
|
||||||
|
>;
|
||||||
getAddLoading?: (previous?: boolean) => boolean;
|
getAddLoading?: (previous?: boolean) => boolean;
|
||||||
getDeletePromiseChain?: <T>(
|
getDeletePromiseChain?: <T>(
|
||||||
base: DeletePromiseChainGetter<T>,
|
base: DeletePromiseChainGetter<T>,
|
||||||
|
Loading…
Reference in New Issue
Block a user