[Dropdown] Search Selection does not work with remote-content / API


#1

My search dropdowns are loaded like that :

$('#myDropdown').dropdown({
   apiSettings: {
        url:'...',
        saveRemoteData:false
   }
})

Options are loaded correctly, dropdown is opening and the input supports keyboard input ; BUT dropdown options are not filtered according to what you are typing in the input (all options are shown regardless what you type).

No errors triggered in debugger.

Note : In the doc, http://semantic-ui.com/modules/dropdown.html#remote-content, you can see that typing filters the dropdown correctly. But if you look closely, it makes an API call for every input made my the user, which I don’t want : my list of options is already here, I don’t want to call the API for every search.

Thanks !


#2

Having a same issue, here is fiddle: https://jsfiddle.net/perke/n1vyfu46/


#3

Still having the same issue, after updating to 2.2.4


#4

I have forked this repo & done some enhancement to support local search with remote API content.

If you have the same issue, have a look at my commit here .

localSearch is default to true, so every api remote data will be search and filtered as expect.

If you need to turn this function off, simply set it to false as below:

$modelDropdown.dropdown({
  apiSettings: {
    url: '/api/data.json'
  },
  fields: {
    name  : 'name', // displayed dropdown    
    value : 'id'         // actual dropdown value
  },
  localSearch: false,
});

#5

Just so anybody reading this is aware, this has been changed in latest version to filterRemoteData