I put together a search based on a text field and a form observer.  The
observer triggers an ajax method that does a paginated search of a large
number of items and does a render :update to update the list of items
with the new contents based on the search.  Pretty standard stuff.

The weirdness is that the very first character typed in the search term
field typically results in a large number of items to return.  The
second character greatly reduces the size of the results, as do the
subsequent characters typed in.

What happens visually is that if you type a few characters quickly, you
get the expected short list of results...followed a second or two later
by the larger result set appropriate to the first character typed.  The
logging confirms that the rails app is doing the right thing in the
right order.

It appears that it is simply the size of that first set of results that
is causing it to take longer to get to the browser, so it winds up being
displayed out of order.

Anybody run into something like this before?  Did you come up with some
clever solution?

thanks,
Jeff
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to