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

fix #32: handle custom params in URLs #33

Closed bboyle closed 9 years ago

bboyle commented 9 years ago
scottssutton commented 9 years ago

This seems to have fixed most of the issue. If I search for an item using this mam.js it remembers custom parameters I've set and if I do a subsequent search, it remembers the items I set in my previous search.

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.

<li class="widget-col-half-right">
                <label for="status">
                    <span class="label">Status</span>
                </label>
                <select ng-model="form.search.Stage" id="status">
                   <option value="Current" selected="selected">Current</option>
                   <option value="Complete">Complete</option>
                    <option value="Planning study">Planning study</option>
                    <option value="">All</option>

                </select>
            </li>
bboyle commented 9 years ago

Options:

ngSelect feels nicer for authors.