daveaglick / FluentBootstrap

Provides extensions, helper classes, model binding, and other goodies to help you use the Bootstrap CSS framework from .NET code.
http://www.fluentbootstrap.com
MIT License
200 stars 76 forks source link

FluentBootstrap SelectFor() does not select the option which value is equal to the property value, contrast to Razor DropDownListFor() behavior. #31

Closed ryanelian closed 9 years ago

ryanelian commented 9 years ago

The Controller

1

The View

2

The Result

3

Thank you in advance and keep up the good work!

daveaglick commented 9 years ago

This is now fixed in develop. It was a little more complicated than the fix for RadioFor because the select list could potentially have options added after creation using AddOptions. Ended up storing the model value (if any) in the Select component for use in subsequent AddOptions calls.