Closed PhilPJL closed 4 years ago
Does this happen with just straight bootstrap-select, not ajax-bootstrap-select?
Yes it works fine for straight bootstrap-select.
I'm having same issue but with data-content. Data-content shows fine in the dropdown but when is selected shows only text. The problem is only with ajax-boostrap-select, in straight bootstrap-select works fine (see attached image, 'Prueba' dropdown is working with straight bs-select, tags with ajax-bs-select)
Having same issues @truckingsim.
Before starting typing ( using ajax ) => http://i.imgur.com/2DQ1ZCU.png After one single letter => http://i.imgur.com/NgYSRJB.png
Can we fix this? :D
This is my setup:
select.ajaxSelectPicker({
locale: {
searchPlaceholder: placeholderText,
},
ajaxSearchUrl: `my awesome url`,
ajax: {
type: 'GET',
headers: {
'Authorization': `Bearer my token`
},
dataType: 'json',
data: () => {
return {
searchBy: '{{{q}}}',
maxResults: 5
};
}
},
emptyRequest: true,
preprocessData: function (items: Object[]) {
I do Some Magic...
return apiResponse;
},
preserveSelectedPosition: 'before',
preserveSelected: false // if set to true, cause bug with ghost elements.
});
I'm initialising the select like so:
Which works fine and we get a nice drop down like this
However when I select one of the items, the sub-text and icon aren't displayed, just the text - as you can see in the image.
It should really look like: