zelect icon indicating copy to clipboard operation
zelect copied to clipboard

Empty element produces [object Object] in dropdown

Open firedev opened this issue 11 years ago • 2 comments

<option value=""></option>

firedev avatar May 28 '13 01:05 firedev

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.)

mtkopone avatar Jun 12 '13 10:06 mtkopone

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.

firedev avatar Jun 12 '13 11:06 firedev