zelect
zelect copied to clipboard
Empty element produces [object Object] in dropdown
<option value=""></option>
I wonder what should be displayed?
I know it's not "[object Object]", but an empty string or such will most likely by as confusing to users.
For a fast work-around, you can override opts.renderItem with a function that does whatever you need for empty elements.
(Sorry about the lateness of the response, I'm currently on paternity leave.)
No problem, I just got a baby daughter 3 weeks ago and since then time and sleep are precious commodities.
It is a good point, I think you can display an empty string. Or even better -– display an empty string if there is a value
attribute and ignore it if there is no value
.