Browse Source

Search remote data before showing if necessary #4041, fix typo in remote search setting

pull/4454/merge
Jack Lukic 8 years ago
parent
commit
6b759b74c0
2 changed files with 9 additions and 1 deletions
  1. 1
      RELEASE-NOTES.md
  2. 9
      src/definitions/modules/dropdown.js

1
RELEASE-NOTES.md

@ -12,6 +12,7 @@
**Bugs**
- **Button** - Fixed issue where css specificity caused `icon buttons` to not center correctly #4487
- **Dropdown** - Fixed bug where clicking `dropdown icon` using remote data would cause nothing to happen #4041
- **Dropdown** - Fix bug where `scrolling menu` or `scrolling dropdown` would have excessive right padding by removing scrollbar width from calculation (no longer necessary in modern browsers)
- **Comments** - `small`, `large` and other comment sizes now default to global size variables.

9
src/definitions/modules/dropdown.js

@ -461,6 +461,10 @@ $.fn.dropdown = function(parameters) {
? callback
: function(){}
;
if(!module.can.show() && module.is.remote()) {
module.debug('No API results retrieved, searching before show');
module.queryRemote(module.get.query(), module.show);
}
if( module.can.show() && !module.is.active() ) {
module.debug('Showing dropdown');
if(module.has.message() && !(module.has.maxSelections() || module.has.allResultsFiltered()) ) {
@ -702,7 +706,7 @@ $.fn.dropdown = function(parameters) {
if(settings.apiSettings) {
if( module.can.useAPI() ) {
module.queryRemote(searchTerm, function() {
if(settings.filterAPIResults) {
if(settings.filterRemoteData) {
module.filterItems(searchTerm);
}
afterFiltered();
@ -3086,6 +3090,9 @@ $.fn.dropdown = function(parameters) {
multiple: function() {
return $module.hasClass(className.multiple);
},
remote: function() {
return settings.apiSettings && module.can.useAPI();
},
single: function() {
return !module.is.multiple();
},

Loading…
Cancel
Save