Skip to content

Commit

Permalink
Filter: Fix select2 issue. Closes #1497
Browse files Browse the repository at this point in the history
  • Loading branch information
Mottie committed Jan 18, 2018
1 parent 6a01ca0 commit b5b780c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/widgets/widget-filter-formatter-select2.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,16 @@
if (arry) {
v = v.split('\u0000');
}
if (!ts.isEmptyObject($input.find('.select2').data())) {
if (!ts.isEmptyObject($cell.find('.select2').data())) {
$input
// add regex, so we filter exact numbers
.val(
$.isArray(v) && v.length && v.join('') !== '' ?
'/(' + matchPrefix + (v || []).join(matchSuffix + '|' + matchPrefix) + matchSuffix + ')/' + flags :
''
)
.trigger('search').end()
.find('.select2').select2('val', v);
.trigger('search');
$cell.find('.select2').select2('val', v);
// update sticky header cell
if (c.widgetOptions.$sticky) {
c.widgetOptions.$sticky.find('.select2col' + indx + ' .select2').select2('val', v);
Expand Down

0 comments on commit b5b780c

Please # to comment.