-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
I try to point the filter of the multiselect to add some stuff. But as it seems the child nodes are not in DOM at this time.
I use a specific template for the filter.
jQuery('select[multiple="multiple"]').multiselect({
buttonWidth: '300px',
enableCaseInsensitiveFiltering: true,
filterPlaceholder: 'Filtern...',
includeSelectAllOption: true,
selectAllJustVisible: true,
buttonTextAlignment: 'start',
selectAllText: 'Alle auswählen',
allSelectedText: 'Alle ausgewählt',
nonSelectedText: 'Auswählen',
nSelectedText: ' ausgewählt',
buttonClass:' form-select text-start',
templates: {
filter: '<div class="multiselect-filter d-flex align-items-center"><i class="fas fa-sm fa-search text-muted"></i><input type="search" class="multiselect-search form-control" data-selectAllText-original="Alle auswählen" data-selectAllText-filtered="Alle gefilterten auswählen" /></div>'
},
onInitialized: function(select, container) {
console.log(container.children('.multiselect-container').children().length) // result: 0, should be count of select->options plus 1 (the filter tag)
}
});
I can't find any solution to wait till everything is in place to alter some things
Metadata
Metadata
Assignees
Labels
No labels