Closed GoogleCodeExporter closed 8 years ago
If you want, i can try to make a patch for this
Original comment by francesc...@gmail.com
on 19 Dec 2009 at 1:04
It's not very wise.
The purpose of this plugin - to "decorate" the existing <select> without
modifying it's
standard behaviour (let's ignore filtering for a minute). So it's
1. not a defect,
2. it's better to add an "<optoion>Select something</option>" in the
server-side code,
rather than increasing complexity with this feature.
3. the right implementation would be not adding a new option, but just modify
function
"setInputFromMaster" to make it set "this.input.val('');" if an option is set.
Original comment by Erel...@gmail.com
on 20 Jan 2010 at 10:59
Doing this is in effect adding a new option element, as the list is backed by
and
reflects the real select list; this is the "unobtrusive" part of the name.
If you want the user to be able to submit an empty value - add it in the
original.
You can then have a value submit (e.g. <option value="-1"></option>) and your
server
can interpret it as needed.
if you really want clientside to add the empty value, just do this:
$("select").prepend("<option value="-1"></option>");
Original comment by thetoolman
on 4 Feb 2010 at 6:58
Original issue reported on code.google.com by
francesc...@gmail.com
on 18 Dec 2009 at 8:44