Editor: type select displays it's value after change
Editor: type select displays it's value after change
shaheenc
Posts: 2Questions: 1Answers: 0
Hi,
I am having trouble with inline editing for type="select", could you please check following link?
http://live.datatables.net/zuwodula/8/edit
*type of second column is "select", but when I change it, display value is changed to id,
it should display options label,
how can I achieve this?
one thing I can do is: track change event of select and manipulate dom, which I don't want.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There are two options:
columns.render
function to transform the value to a label. Since you have a static list of values, that might be the easiest option here (i.e. just a simplecase
orif
statement).Allan
yes I used columns.render option,
I was querying if there was any builtin, because we are adding option
as
options: [{ label: 'To do', value: 1 }, { label: 'Done',value: 2 }]