Code Separation From Config¶
UI Maker is deprecated
UI Maker is kept for the projects which use it and will be removed in API Maker v4. New admin screens are better built with any frontend framework on top of the generated APIs.
👉 By using this feature we can make config file small and more managable.
Call function from main file.¶
let dbMasterConfig: T.IDBMasterConfig = {
form: {
fields: [
[{ // field
label: 'First Name',
control: T.EDBMasterFormControl.input,
path: 'name',
inputTextSettings: {
jsCode: [{
appendTo: T.EDBMasterInputTextAppendTo.blur,
code: `userUtils.Main.first_name_blur`, // 👈 Call function like this.
}],
}
}]
]
}
};
Call function from common utilities¶
👉 These functions are common across UI Pages, you can call them from any page.
👉 You can click on this icon to open page to manage common utilities.
let dbMasterConfig: T.IDBMasterConfig = {
form: {
fields: [
[{ // field
label: 'First Name',
control: T.EDBMasterFormControl.input,
path: 'name',
inputTextSettings: {
jsCode: [{
appendTo: T.EDBMasterInputTextAppendTo.blur,
code: `userUtils.GeneralUtils.printTodayInConsole`, // 👈 Call function like this.
}],
}
}]
]
}
};