Hi Pepper!
On Sun, May 27, 2012 at 4:29 AM, Pepper Lebeck-Jobe <
elj...@gmail.com> wrote:
> When you are using a filter on a template object and one of the properties
> of the template object is bound to a select box which has a "None" option
> which sets the value back to the empty string. The filter matches Nothing
> instead of Everything. To demonstrate:
>
>
http://jsfiddle.net/eljobe/H5yuW/
I would consider this a bug... I've slightly modified the jsFiddle to
see what is going on:
http://jsfiddle.net/pkozlowski_opensource/H5yuW/10/
As you can see from the console output the difference is that:
1) at the begining the
search.name is initailized to an empty string
2) selecting None binds null to the
search.name
A work-around I could think of would consist of watching
search.name,
like this:
http://jsfiddle.net/pkozlowski_opensource/H5yuW/11/
There are probably other approaches (like having colors holding not
only labels but objects with lable=>value), but once again I find this
behaviour puzzling so this should either be considered as a bug or
what do we miss here is an ability to specify the model value for
<option>.
Cheers,
Pawel