Code Separation From Config
👉 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.
}],
}
}]
]
}
};