Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have fix the problem of reset multiselect after use search filter.
angular-bootstrap-multiselect.js:
(function () {
'use strict';
}());
angular.module('btorfs.multiselect.templates', ['multiselect.html']);
angular.module("multiselect.html", []).run(["$templateCache", function ($templateCache) {
$templateCache.put("multiselect.html",
"<div class="btn-group" style="width: 100%">\n" +
" <button type="button" class="btn dropdown-toggle" ng-class="classesBtn" ng-click="toggleDropdown()" ng-disabled="disabled" style="white-space: nowrap; overflow-x: hidden; text-overflow: ellipsis;">\n" +
" {{getButtonText()}} <span class="caret">\n" +
" \n" +
" <ul class="dropdown-menu dropdown-menu-form dropdown-menu-form-custom"\n" +
" ng-style="{display: open ? 'block' : 'none'}" style="width: 100%; overflow-x: auto">\n" +
"\n" +
" <li ng-show="showSelectAll">\n" +
" <a ng-click="selectAll()" href="">\n" +
" <span class="glyphicon glyphicon-ok"> {{labels.selectAll || 'Select All'}}\n" +
" \n" +
" \n" +
" <li ng-show="showUnselectAll">\n" +
" <a ng-click="unselectAll()" href="">\n" +
" <span class="glyphicon glyphicon-remove"> {{labels.unselectAll || 'Unselect All'}}\n" +
" \n" +
" \n" +
" <li ng-show="(showSelectAll || showUnselectAll)"\n" +
" class="divider">\n" +
" \n" +
"\n" +
" <li role="presentation" ng-repeat="option in selectedOptions" class="active">\n" +
" <a class="item-selected" href="" title="{{showTooltip ? getDisplay(option) : ''}}" ng-click="toggleItem(option); $event.stopPropagation()" style="overflow-x: hidden;text-overflow: ellipsis">\n" +
" <span class="glyphicon glyphicon-remove">\n" +
" {{getDisplay(option)}}\n" +
" \n" +
" \n" +
" <li ng-show="selectedOptions.length > 0" class="divider">\n" +
"\n" +
" <li ng-show="showSearch">\n" +
" <div class="dropdown-header">\n" +
" <input type="text" class="form-control input-sm" style="width: 100%;"\n" +
" ng-model="searchFilter" placeholder="{{labels.search || 'Search...'}}" ng-change="updateOptions()"/>\n" +
" \n" +
" \n" +
"\n" +
" <li ng-show="showSearch" class="divider">\n" +
" <li role="presentation" ng-repeat="option in unselectedOptions | filter:search() | limitTo: searchLimit"\n" +
" ng-if="!isSelected(option)"\n" +
" ng-class="{disabled : selectionLimit && selectedOptions.length >= selectionLimit}">\n" +
" <a class="item-unselected" href="" title="{{showTooltip ? getDisplay(option) : ''}}" ng-click="toggleItem(option); $event.stopPropagation()" style="overflow-x: hidden;text-overflow: ellipsis">\n" +
" {{getDisplay(option)}}\n" +
" \n" +
" \n" +
"\n" +
" <li class="divider" ng-show="selectionLimit > 1">\n" +
" <li role="presentation" ng-show="selectionLimit > 1">\n" +
" {{selectedOptions.length || 0}} / {{selectionLimit}} {{labels.itemsSelected || 'selected'}}\n" +
" \n" +
"\n" +
" \n" +
"\n" +
"");
}]);
HTML EXAMPLE:
CALL RESET FROM CONTROLLER: