Select uses value instead of text as display
mendelk opened this issue · comments
In order for xeditable to display select values properly, the element being used (span
by default) should not have any content in it, and xeditable will generate the value based on the data-value
and the data-source
.
However, because x-editable-rails will generate content in every element-type case, we end up seeing the value
and not the text
. (So if the data-source
is [{text: "Male", value: "male"}, {text: "Female", value: "female"}]
, and the data-value
is male
, we end up seeing male
, and not Male
).
This behavior is defined here
Pull request cannot be easily merged anymore, so I made update manually. Based on you code. Thanks!