ng-multiselect-dropdown
ng-multiselect-dropdown copied to clipboard
The placeholder should show always even when we select a dropdown value
Angular version: 9.1.11
ng-multiselect-dropdown version: 0.2.10
Description of issue: When I select value input placeholder is changing to +1,2 based on how many I select. I want to hide the selected number. I want to show a default placeholder.

Steps to reproduce: In ng-multiselect-dropdown setting object, set itemShowLimit: 0
Expected Result:
The placeholder should show always even when we select a dropdown value
Actual result:

Demo: Please share sample code link using StackBlitz or codesandbox https://stackblitz.com/edit/angular-multiselect-dropdown-gjmk26 Any relevant code:
this.dropdownSettings = {
singleSelection: false,
idField: 'item_id',
textField: 'item_text',
selectAllText: 'Select All',
unSelectAllText: 'UnSelect All',
itemsShowLimit: 0,
allowSearchFilter: true
};
The below might not be the right solution but you can catch the node and remove like below in javascript. You can run the below in ngOninit also.
onSelectAll(items: any) { if ( document.getElementsByClassName('dropdown-multiselect__caret')[0] ) { const node = document.getElementsByClassName('dropdown-multiselect__caret')[0].parentNode.firstChild as HTMLElement node.remove(); }
}
Hello, I've been dealing with this issue for a few days now, didnt find an answer so i started digging in the directive's js files and inside of those (i think its like 5-6) files, there is a line in which the template is declared. I just simply replaced that template with a bit of changed code that removes the whole thing and sets placeholder active at all times.
I hope this answer can be at least a bit relevant, even tho im answering a bit late.
I inluded .txt file, didnt know how to share the code - putting it here would be just ugly
(I did it by simply ctrl+h on all files inside ng-multiselect-dropdown folde Howtosetplaceholder.txt r)