1. Fill using a Local Array
Instantly map an array of JavaScript objects to a dropdown.
$$$("localCombo").fillComboBox({
"dataSource" : staticDesignations,
"text" : "title",
"value" : "code",
"firstOption" : {
"text" : "< Select IT Role
>",
"value" : "-1"
}
});
2. Fill using $$$.ajax (Live Database)
Fetch designations from the live MockAPI database and populate the dropdown.
$$$("dbCombo").fillComboBox({
"dataSource" : designationsFromAPI,
"text" : "title",
"value" : "code",
"firstOption" : {
"text" : "< Select Designation
>",
"value" : "-1"
}
});