nitrogen/nitrogen_core — pull request #84 by stuart-thackray (2014-10-07 10:37:25+00:00)
Title: #dropdown{} option change

Hi,

This is really minor change and considered not even doing a pull request for it.

But if you use some restful forms/don't populate the value field of dropdown it can cause problems.

This can be seen at the dropdown at http://nitrogenproject.com/demos/simplecontrols where the html renders everything as selected.

Dropdown
Option 1
Option 2
Option 3

This is due the function selected_or_not/2 being passed Selected as [] instead of what it was trying to check i.e. undefined. And as you might not have filled in the value feild therefore it would be [] and match Selected.

Hope this change request is not too minor, as I realise that it can be bypassed by using value and not only the text field of the #option{}.

Thanks Jesse.