Opened 8 years ago
Last modified 4 years ago
#17224 open defect
stale load of combobox
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | 1.15 |
Component: | Dijit - Form | Version: | 1.8.4 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hi I'm using the onSearch event to load data from our server using ajax, which is re-populating the combobox datastore. When onSearch is completed, somewhere in combobox code the loadDropDown must be called. This all works fine if one key is pressed at a time with a pause between keystrokes, but if multiple characters are pressed (or pasted), the returned list isn't what was loaded via ajax, but the list from the original search. The work-around is to call loadDropDown in a setTimeout after the search in the onSearch event, which is a bit messy (see below)
onSearch: function(results, query, options) {
if ( activeSearch ) return; activeSearch = true;
searchReferenceComboBox(); /* gets new data via ajax */
var currentComboBox = dijit.byId(\"dojo_\" + ctrlId);
setTimeout(function(){currentComboBox.loadAndOpenDropDown()},300);
}, ... ...
onKeyPress: function(){
activeSearch = false;
},
Change History (4)
comment:1 Changed 7 years ago by
Owner: | set to Douglas Hays |
---|---|
Status: | new → assigned |
comment:2 Changed 7 years ago by
Owner: | Douglas Hays deleted |
---|---|
Status: | assigned → open |
comment:3 Changed 5 years ago by
Milestone: | tbd → 1.12 |
---|
comment:4 Changed 4 years ago by
Milestone: | 1.13 → 1.15 |
---|
Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.
Bulk update of unassigned Dijit - form tickets