BrandwatchLtd/selleckt — pull request #56 by jonathanmiles (2014-09-24 12:02:05+00:00)
Title: No longer selecting first item by default

This stops selleckt from selecting the first option by default - instead, it will only select items which explicitly have the "selected" attribute set. As such, if no option is marked as selected then nothing will be selected and the placeholder text will be visible.

I think the existing behaviour carries over from standard select elements, but it doesn't feel that natural in the context of Selleckt - and having to put an empty option at the top of the list feels like a bit of a fudge, given that placeholders aren't handled as options.

Although this didn't break any tests it _has_ changed the behaviour - the first two examples on the demo page now default to showing a placeholder, rather than selecting "Foo". Although I think this is a better default behaviour for most cases, I suppose I could always make this a setting that has to be turned on, if preferable?

I think this addresses this issue: https://github.com/BrandwatchLtd/selleckt/issues/54