Browse Source

add localsearch function for dropdown with api remote data

pull/4815/head
Enix Yu 8 years ago
parent
commit
9efa323488
1 changed files with 4 additions and 0 deletions
  1. 4
      src/definitions/modules/dropdown.js

4
src/definitions/modules/dropdown.js

@ -702,6 +702,9 @@ $.fn.dropdown = function(parameters) {
if(settings.apiSettings) {
if( module.can.useAPI() ) {
module.queryRemote(searchTerm, function() {
if (settings.localSearch) {
module.filterItems(searchTerm);
}
afterFiltered();
});
}
@ -3501,6 +3504,7 @@ $.fn.dropdown.settings = {
apiSettings : false,
localSearch : true, // Whether trigger local search instead of querying data from remote source
selectOnKeydown : true, // Whether selection should occur automatically when keyboard shortcuts used
minCharacters : 0, // Minimum characters required to trigger API call
saveRemoteData : true, // Whether remote name/value pairs should be stored in sessionStorage to allow remote data to be restored on page refresh

Loading…
Cancel
Save