MaxBk MaxBk - 25 days ago 30
CSS Question

Adding scrollbar to bootstrap tokenfield autocomplete

I couldn't find any documentation or questions about enabling scroll bar on bootstrap's tokenfield autocomplete.

My field has a lot of users form Active Directory and it's mandatory for us to have this scroll.

$(usersList).tokenfield({
autocomplete: {
source: values,
delay: 10,
focus: function (event, ui) {
event.preventDefault();
$(this).val(ui.item.label);
}
},
showAutocompleteOnFocus: true
});

//prevent adding duplicate values
$(usersList).on('tokenfield:createtoken', function (event) {
var existingTokens = $(this).tokenfield('getTokens');
$.each(existingTokens, function(index, token) {
if (token.value === event.attrs.value)
event.preventDefault();
});
});

Answer

Found alter controllers that fit me thanks to Atlassian.
https://docs.atlassian.com/aui/

Comments