Custom MultipleSelection with CustomAdapter no search inline
See original GitHub issuePrerequisites
[ x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate [x ] The issue still exists against the latest master branch of Select2 [x ] This is not a usage question (Those should be directed to the community) [x ] I have attempted to find the simplest possible steps to reproduce the issue [x ]I have included a failing test as a pull request (Optional)
The Problem
When I try to use CustomSelectionAdapter the search never appear in the input the
'<li class="select2-search select2-search--inline">' +
'<input class="select2-search__field" type="search" tabindex="-1"' +
' autocomplete="off" autocorrect="off" autocapitalize="none"' +
' spellcheck="false" role="textbox" aria-autocomplete="list" />' +
'</li>'
never appear all the rest is working perfectly
Steps to reproduce the issue
$.fn.select2.amd.require([
"select2/utils",
"select2/selection/multiple",
"select2/selection/placeholder",
], function (Utils, MultipleSelection, Placeholder) {
var CustomSelectionAdapter = Utils.Decorate(MultipleSelection, Placeholder);
CustomSelectionAdapter = Utils.Decorate(CustomSelectionAdapter, EventRelay);
CustomSelectionAdapter.prototype.update = function(data) {
// I vave tried lot of thing but it never work
}
return CustomSelectionAdapter;
});
Don’t know if it 's a bug or a lack of documentation
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
Multiple selection listview android with custom adapter
Your adapter holds all the items of your list. In your case one instance of such an item should at least contain a...
Read more >Multiple Item Selection in RecyclerView - Android ... - YouTube
Multiple Item Selection in RecyclerView - Android RecyclerView Tutorial ... RecyclerView Android Example with custom adapter, list sorting ...
Read more >Android ListView with Custom Adapter Example Tutorial
In this tutorial we'll use a CustomAdapter that populates the custom rows of the Android ListView with an ArrayList . Also to enhance...
Read more >Extending Select2 with Adapters - Bojan Veljanovski
Example: Custom multiple select · Ability to search items from a dedicated search box, shown in the dropdown (same as in single select)....
Read more >Core options - History of Romney Marsh
This is only required when a custom adapter is being used, as Select2 will build ... or be shown when no options are...
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 Free
Top 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
Ok I manage to find the way to do it Here is a complete example I hope it ca help someone
Sorry to bother again but with this code
I have this error
The error seem to be here