Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#3485 closed defect (fixed)

[ComboBox] Search timing issues

Reported by: haysmark Owned by: haysmark
Priority: high Milestone: 0.9beta
Component: Dijit - Form Version: 0.9
Keywords: Cc:
Blocked By: Blocking:


When we actually deploy ComboBox? on large databases, some funny things are going to start happening.

Say you type C into a ComboBox? that is part of a large form. There are 10,000 entries that start with C. That will take a while to serialize and download.

Then say you immediately type A. There is 1 entry that starts with CA. On a normal multithreaded server, that will return nearly instantly.

But some time later, say AFTER you are done entering the value of the ComboBox? and you are moving on to something else on the form, the C query comes back. Your CPU goes crazy, and a menu randomly pops open with 10,000 items on your screen. You're thinking, what the heck just happened?

ComboBox? needs a way to know:

  • What the last query was
  • What query a given set of results belongs to

It's easy to store the last query as a state variable. But comparing queries involves getting help from, which has to tell the callback function what the query for these results is.

Change History (4)

comment:1 Changed 12 years ago by haysmark

Component: GeneralDijit

comment:2 Changed 12 years ago by bill

Yes, this definitely has to be tested/handled. You don't need help from though. For example you could do this:

_startSearch: function(/*String*/ key){
    var query= ...;
    var self = this; onComplete: function(){ self._openResultList(query);});

comment:3 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [9239]) Fixes #3483, #3485. Proxy commit for haysmark. Clicking the arrow button on a ComboBox? with autocomplete=true does not replace the text in the textbox with the first item in the list. If you perform multiple searches on a ComboBox?, ComboBox? will only pay attention to the results of the last search. ComboBox? is still broken due to regressions being tracked in #3489.

comment:4 Changed 8 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.