We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed638c4 commit 36cc51dCopy full SHA for 36cc51d
1 file changed
adminforth/types/Common.ts
@@ -556,6 +556,11 @@ export interface AdminForthForeignResourceCommon {
556
unsetLabel?: string,
557
}
558
559
+export type FillOnCreateFunction = (params: {
560
+ initialRecord: any,
561
+ adminUser: AdminUser,
562
+}) => any;
563
+
564
/**
565
* Column describes one field in the table or collection in database.
566
*/
@@ -686,7 +691,7 @@ export interface AdminForthResourceColumnInputCommon {
686
691
687
692
* Called on the backend when the record is saved to a database. Value returned by `fillOnCreate` will be saved to the database.
688
693
689
- fillOnCreate?: Function,
694
+ fillOnCreate?: FillOnCreateFunction,
690
695
696
697
* Single value that will be substituted in create form. User can change it before saving the record.
0 commit comments