angularjs-dropdown-multiselect icon indicating copy to clipboard operation
angularjs-dropdown-multiselect copied to clipboard

clearSearchOnClose not working v1.11.8

Open deepinder10 opened this issue 7 years ago • 6 comments

                                    <div id="{{'aC' + day.day_id}}"  ng-dropdown-multiselect="" options="categoriesNewData[day.day_id]" events="NewDropdownEvents" selected-model="selectedNewCategories[day.day_id]" translation-texts="categoryCustomText" extra-settings="categorySettings"></div>

    $scope.categorySettings = {externalIdProp:'',enableSearch: true,scrollableHeight: '200px', scrollable: true,showCheckAll: false,showUncheckAll: false,clearSearchOnClose:true  };

whenever i close it, search is not clearing.

deepinder10 avatar Apr 25 '17 13:04 deepinder10

+1

rohithshenoyg avatar May 21 '17 19:05 rohithshenoyg

was having the same problem. FWIW: Changing the close function from

$scope.close = function() {
    $scope.open = false;
    $scope.externalEvents.onClose();
}

to

$scope.close = function() {
    $scope.open = false;
    if($scope.settings.clearSearchOnClose){
        $scope.input.searchFilter = '';
    }
    $scope.externalEvents.onClose();
}

worked for me.

randanunn avatar Sep 09 '17 05:09 randanunn

@randanunn , how can i use the same fix in my dev environment as i am using direct dependency in my package.json ? when this fix will be promoted to master of this project. Or is there any alternative to fix it from developer side code ? Can you please help on this as it's bugging be from past 2 days.

chereddyn9 avatar May 19 '18 05:05 chereddyn9

@chereddyn9 I am in the exact same situation as you. I had to remove this from my package.json and import it from a local copy so that I could put this fix and a few others in. I am not a contributor on the project and the last release for v1 was over a year ago so I do think we'll be seeing an updated npm package any time soon. Are you able to use v2 instead? I haven't verified that this issue is fixed in v2 but I know that a lot of the issues in v1 got sorted out in v2

randanunn avatar May 19 '18 17:05 randanunn

Why don't you try moving the angular dropdown folder out of bower components or node modules folder into your custom scripts folder and then refer to it? You can always remove it from your bower.json or package.json then, edit the js file with the fix, and deploy if it's super urgent. At a later point in time, refer back to it, see if there are no breaking changes and add reference back in. Otherwise pull request and wait.

rohithshenoyg avatar May 19 '18 17:05 rohithshenoyg

@randanunn , Thanks for your quick response. "2.0.0-beta.10" - in this release this fix is promoted, but there are few breaking changes init. Need to check promptly and then need to upgrade into 2.0.0-beta.10.

chereddyn9 avatar May 20 '18 14:05 chereddyn9