Skip to content

Commit

Permalink
Ensures filter popups load selects correctly
Browse files Browse the repository at this point in the history
If loading a filter onto a form with a select already having a selected
option, then need to clear the existing value first.
  • Loading branch information
johnvanbreda committed Apr 17, 2018
1 parent 95c95d3 commit 261b39e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/reportFilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -1325,6 +1325,7 @@ jQuery(document).ready(function ($) {
attrName = indiciaData.filter.def.date_type + '_' + attrName;
}
if ($(ctrl).is('select')) {
$(ctrl).find('option:selected').removeAttr('selected');
value = typeof indiciaData.filter.def[attrName] === 'undefined' ? '' : indiciaData.filter.def[attrName];
option = $(ctrl).find('option[value="' + value + '"]');
if (option) {
Expand Down

0 comments on commit 261b39e

Please sign in to comment.