Select Box in Editor Modal
Select Box in Editor Modal
Below is the array of objects var demo= ["--None--", "APPRO1", "APPROV", "CAE1", "CAN0", "CAN1", "CAN3", "CME3", "CQE0", "CQE1", "CQE3"];
I want to display this demo in the modal for the datatable as a dropdown and below is what I have used.
editor.add({
type: "select",
label: "Approval Type:",
name: "approvalType",
data : demo,
options:[
demo
]
});
When my modal opens it does not populates the dropdown. It remains empty without any values. Any suggestion on this?
Answers
Change:
To be:
demo
is already an array. Wrapping it in another array will just confuse things!Allan