qld-gov-au / qgov-mam-angularjs

Map-based information services based on Queensland Government data
http://qld-gov-au.github.io/qgov-mam-angularjs/demo/
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

do we need a better way to select default values in dropdown? #38

Open bboyle opened 9 years ago

bboyle commented 9 years ago

ng-init can be used, but ng-selected is preferable.

One issue that still appears to be happening is that I can't set a default parameter for a dropdown menu that isn't All. If an All option is available this will show up by default, no matter where in the list it is or whether another option containing selected="selected". If there is not an All option in the menu a blank item is shown by default, not the first item in the list or the option containing selected="selected"

For example, I want to have a Status dropdown menu with the options Current (default), Complete and Planning Study. I've used the code below. This shows the All option as the default (even though it's last in the list), and if I remove the All option, that menu item is blank.

comment on #33

Options:

ngSelect feels nicer for authors.

bboyle commented 9 years ago

https://github.com/qld-gov-au/qgov-mam-angularjs/wiki#setting-the-default-value-of-select-controls