Clear filter set empty string against clear array
See original GitHub issue- Create element
<select name="types[]" multiple="multiple"></select>
- Initialize
allowClear: true,
- delete all selected items and you get array with empty sting.
Proof:
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Remove empty elements from an array in Javascript
1. BEWARE: filter(String) and filter(Object) do not filter out null or numbers. · 1. Nice answer, although I wonder about the performance overhead...
Read more >How to Remove Empty Strings From an Array in JavaScript
To remove empty strings from an array in JavaScript, call the filter() method on the array, passing a callback that returns true for...
Read more >Remove Empty Strings from an Array in JavaScript | bobbyhadz
To remove all empty strings from an array, use the `Array.filter()` method to iterate over the array. Check if each element is not...
Read more >How to Remove Empty Strings From an Array ... - Coding Beauty
To remove empty strings from an array in JavaScript, call the filter() method on the array, passing a callback that returns true for...
Read more >How to Remove Empty Elements from an ... - Tutorial Republic
You can simply use the filter() method to remove empty elements (or falsy values) from a JavaScript array. A falsy value is a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
To be fully complete :
as explained on previous post
bug is the empty button appearing at start of the selected items as explained on previous post. Expected to Not have it.
Latest Firefox, Chrome and Safari on Latest Ubuntu (18.04.5 / 20.04.1 LTS), Windows (10) and MacOS (Catalina, BigSur)
Yes, fully reproducible !
Don’t know if it can be applied to those examples, but have to try…
“select2”: “4.0.6-rc.0”, “jquery”: “3.3.1”, => We kept an aloder version of jquery because of the annoying auto focusing not working on latest jquery version…
Nope. select2+jquery are the main used.
Hope it helps 😃
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.