Commit 1d17e957 authored by David Stutz's avatar David Stutz

Started tests for filter.

parent 06549a01
......@@ -199,6 +199,7 @@
this.options.onDropdownShown = $.proxy(this.options.onDropdownShown, this);
this.options.onDropdownHidden = $.proxy(this.options.onDropdownHidden, this);
this.options.onInitialized = $.proxy(this.options.onInitialized, this);
this.options.onFiltering = $.proxy(this.options.onFiltering, this);
// Build select all if enabled.
this.buildContainer();
......@@ -377,6 +378,14 @@
*/
onInitialized: function($select, $container) {
},
/**
* Triggered on filtering.
*
* @param {jQuery} $filter
*/
onFiltering: function($filter) {
},
enableHTML: false,
buttonClass: 'btn btn-default',
......@@ -796,7 +805,7 @@
var visible = true;
$inputs.each(function() {
visible = visible && !$(this).hasClass('multiselect-collapsible-hidden');
visible = visible && $(this).is(':visible');
});
if (visible) {
......@@ -1023,7 +1032,7 @@
// Cancel enter key default behaviour
if (event.which === 13) {
event.preventDefault();
}
}
// This is useful to catch "keydown" events after the browser has updated the control.
clearTimeout(this.searchTimeout);
......@@ -1102,6 +1111,9 @@
if (this.options.enableClickableOptGroups && this.options.multiple) {
this.updateOptGroups();
}
this.options.onFiltering(event.target);
}, this), 300, this);
}, this));
}
......@@ -1371,9 +1383,8 @@
if (this.options.enableClickableOptGroups && this.options.multiple) {
this.updateOptGroups();
}
console.log('test')
if (triggerOnDeselectAll) {
console.log('test2')
this.options.onDeselectAll();
}
},
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment