Select Box in Editor Modal

Select Box in Editor Modal

abhinav0419@gmail.comabhinav0419@gmail.com Posts: 5Questions: 3Answers: 0

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

  • allanallan Posts: 63,818Questions: 1Answers: 10,517 Site admin

    Change:

    options:[
    demo
    ]

    To be:

    options: demo
    

    demo is already an array. Wrapping it in another array will just confuse things!

    Allan

This discussion has been closed.