I have a problem with TableEdit
This is in the documentation I read:
// Example #2
columns: {
// Column used to identify table row.
// [column_index, input_name]
identifier: [0, 'id'],
// Columns to transform in editable cells.
// [[column_index, input_name], [column_index, input_name, select_options]]
editable: [[1, 'car'], [2, 'color', '{"1": "Red", "2": "Green", "3": "Blue"}']]
}
In the editable key, the second array contains a json-like string that renders as a dropdown list when I press the edit button.
My question is, how do I make that json-like string dynamically?
I have an ajax request that returns a list of departments. I want to pass those departments into that editable column.