Skip to main content

Search and Top Navigation

#5411 closed enhancement (duplicate)

Opened March 23, 2010 07:59PM UTC

Closed July 19, 2010 05:13PM UTC

Last modified October 11, 2012 09:15PM UTC

Scrolling of Autocomplete menu

Reported by: theojapa Owned by:
Priority: minor Milestone:
Component: ui.autocomplete Version: 1.8
Keywords: Cc:
Blocked by: Blocking:

It'd be useful to be able to specify the maximum height of the Autocomplete menu. If necessary, the Autocomplete menu would scroll.

This would allow Autocomplete to work well when there's not much space for the Autocomplete menu below the Autocomplete component.

Attachments (2)
  • autocomplete_limit_rows.2.patch (4.4 KB) - added by chris July 08, 2010 09:08AM UTC.

    fixed bug (wrong variable incremented in original patch)

  • autocomplete_limit_rows.patch (4.4 KB) - added by Ascold May 21, 2010 09:55AM UTC.

    Try this patch to use autocomplete with limited count of rows. May be, in future, it will be modified for scroll.

Change History (4)

Changed July 08, 2010 09:05AM UTC by chris comment:1

Hi there,

There seems to be an error in this patch. I got it to work by inserting the following two code bits (delimited by /*patch0*/ and /*patch1*/ respectively) into the original code:

_renderMenu:function(a,c){var d=this;/*patch0*/var j=0;var m=this.options.maxRows;/*patch0*/e.each(c,function(b,f){/*patch1*/if(m&&m<=j){return false;}++j;/*patch1*/d._renderItem(a,f)})},_renderItem:function(a,c){

The mistake was that in stead of incrementing with "++j" the original patch incremented with "++m". Also, I changed "m&&m<j" to "m&&m<=j"

Thanks for a great patch. Would never have gotten it to work without you!

p.s. I guess I should be uploading a .patch file. I hope you'll forgive me for leaving it at this explanation.

Changed July 08, 2010 09:11AM UTC by jzaefferer comment:2

Please provide patches against files on Github:

We can't use patches against minified files from a release.

Changed July 19, 2010 05:13PM UTC by scottgonzalez comment:3

resolution: → duplicate
status: newclosed

Duplicate of #5610.

Changed October 11, 2012 09:15PM UTC by scottgonzalez comment:4

milestone: TBD

Milestone TBD deleted