Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8924283
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:22:16+00:00 2026-06-15T07:22:16+00:00

I am trying to make a live search combo box and everything is working

  • 0

I am trying to make a live search combo box and everything is working great except for one small detail. I want to call a search method as the user presses the down and up keys through the combo box. This does trigger a select event but the piker has no selection. When I select a combobox item with my mouse or by pressing enter the select event does get a selection. I want to launch queries using the value selected with the down and up keys while navigating the box.

Combo code

searchField = new Ext.form.ComboBox({
    id:'searchField',
    store: queryCacheStore,
    pageSize:0,
    width: 780,
    triggerAction:'all',
    typeAhead:false,
    mode:'remote',
    minChars:2,
    forceSelection:false,
    hideTrigger:true,
    enableKeyEvents:true,
    queryDelay:200,
    queryMode:'remote',
    queryParam:'query',
    queryCaching:false,
    displayField:'query',
    autoSelect:false,
    listConfig:{
        loadingText: 'Searching...',

          // Custom rendering template for each item
          getInnerTpl: function() {
              return '<div class="search-item">' +
                  '{query}' +
                  '</div>';
          }
      },
    listeners: {
        specialkey:function (field, e) {
            if (e.getKey() == e.UP || e.getKey() == e.DOWN) {

            }
        },
        select:function (combo, selection) {
            var post = selection[0];
            searchField.setValue(post.get('query'));
            requestAccessList.runSearch();
        },
        focus:function (combo, event, opts) {
            combo.store.proxy.extraParams = {
                'lcm':true,
                'type':RequestAccess.OBJECT_TYPE
            }
        }
    }

});

So when

select:function (combo, selection) {

gets called with down arrow key or up arrow key then selection is null. When it gets called with enter key or mouse click it has the highlighted combobox selection. So the question is how can I get the value of the combo box from arrow key events?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:22:18+00:00Added an answer on June 15, 2026 at 7:22 am

    OK I figured this out myself. You have to override the highlight event of the BoundListKeyNav

    Ext.view.BoundListKeyNav.override({
          highlightAt:function (index) {
    //            this.callOverridden(index);      For some reason this does not work
            var boundList = this.boundList,
            item = boundList.all.item(index);
            if (item) {
                item = item.dom;
                boundList.highlightItem(item);
                boundList.getTargetEl().scrollChildIntoView(item, true);
                searchField.setValue(boundList.getNode(index).textContent);
                searchService.runSearch();
            }
        }
    });   
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i'm trying to make a live search for my mobile website, I don't want
Trying to make a small countdown timer in my app but it's not working.
I am trying to make a form building tool. Everything was working just fine.
I am trying to make a Live search to show business owner user names,
When trying to run the sample code here: http://www.nikhilk.net/Live-Search-REST-API.aspx I get: Error 52 The
Just to summarize, I'm trying to make a live page render (browse websites) while
I'm trying to make a sticky footer, but it's not quite working for me.
i'm trying to make a simple android apps that read live feed from a
I'm trying to make a table that has one webform per table row. The
So I'm trying to make a live feed essentially, and my code is shown

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.