I'm doing this:
editor = new $.fn.dataTable.Editor({
ajax: 'url',
table: '#invDetailsTable',
fields: [{
label: "Location",
name: "location",
type: "select",
options: locationList
}]
});
locationList is just an array of objects with {label: 'name', value: 0} as the objects. The table comes up and it looks like a dropdown but there are no items in the list. Is there something else I need to do to populate the dropdown? This is all I found in the documentation... I tried it with a list I feed directly to the fields parameter like this:
options: [
{ label: "To do", value: 0 },
{ label: "Done", value: 1 }
],
but had the same result.
Any ideas would be much appreciated!