Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrille37 committed May 7, 2020
1 parent 5185b51 commit dda3d2d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
19 changes: 16 additions & 3 deletions dist/jquery.bootstrap-duallistbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,24 @@
return;
}

saveSelections(dualListbox, selectIndex);
// Cyrille37 patch https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox/pull/75
//saveSelections(dualListbox, selectIndex);
if( ! dualListbox.settings.moveOnSelect )
{
saveSelections(dualListbox, selectIndex);
}

dualListbox.elements['select'+selectIndex].empty().scrollTop(0);
var regex = new RegExp($.trim(dualListbox.elements['filterInput'+selectIndex].val()), 'gi'),
allOptions = dualListbox.element.find('option'),

// Cyrille37 patch https://github.com/istvan-ujjmeszaros/bootstrap-duallistbox/issues/167
//var regex = new RegExp($.trim(dualListbox.elements['filterInput'+selectIndex].val()), 'gi'),

var filterInput = $
.trim(dualListbox.elements['filterInput'+selectIndex].val())
.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
var regex = new RegExp(filterInput, 'gi');

var allOptions = dualListbox.element.find('option'),
options = dualListbox.element;

if (selectIndex === 1) {
Expand Down

0 comments on commit dda3d2d

Please sign in to comment.