Skip to content

Commit

Permalink
fix(bhRendererDropdown): rebuild URL on selection
Browse files Browse the repository at this point in the history
This commit instructs the bhRendererDropdown to rebuild the URL
parameters when the users changes the dropdown menu selection.

Closes #1239.
  • Loading branch information
Jonathan Niles authored and sfount committed Feb 21, 2017
1 parent a882be1 commit 0075e4c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion client/src/js/components/bhRendererDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ function bhRendererController(AppCache, $httpParamSerializer) {

$ctrl.select = function select(option) {
$ctrl.selection = option;
cache.selection = option;
cache.selection = $ctrl.selection;
combineAndSerializeParameters();
};

// watch for changes on the component's border and behave appropriately
Expand Down
4 changes: 2 additions & 2 deletions client/src/partials/templates/bhRendererDropdown.tmpl.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="btn-group" uib-dropdown>
<a class="btn btn-default" ng-href="{{::$ctrl.reportUrl}}?{{$ctrl.params}}" download>
<a class="btn btn-default" ng-href="{{$ctrl.reportUrl}}?{{$ctrl.params}}" download>
<span ng-show="$ctrl.loading">
<i class="fa fa-circle-notch-o"></i> <span translate>FORM.INFO.LOAING</span>
</span>
Expand All @@ -12,7 +12,7 @@
<span class="caret"></span>
</a>
<ul class="dropdown-menu" uib-dropdown-menu role="menu" aria-labelledby="single-button">
<li ng-repeat="option in ::$ctrl.options">
<li ng-repeat="option in $ctrl.options">
<a href ng-click="$ctrl.select(option)">
<i class="fa fa-{{::option.icon}}"></i>
<span translate>{{ ::option.key }}</span>
Expand Down

0 comments on commit 0075e4c

Please sign in to comment.