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

  • Home
  • SEARCH
  • 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 8892513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:01:05+00:00 2026-06-14T23:01:05+00:00

Am trying to put a search field with respect to a data view. There

  • 0

Am trying to put a search field with respect to a data view. There is a toolbar on top of the data view, which consists of a text field. On entering some text in the field, i want to call a search functionality. As of now, i have got hold of the listener to the text field, but the listener is called immediately after the user starts typing something in the text field.

But, what am trying to do is to start the search functionality only when the user has entered at least 3 characters in the text field.How could i do this?

Code below

View

var DownloadsPanel = {
            xtype : 'panel',
            border : false,
            title : LANG.BTDOWNLOADS,
            items : [{

                xtype : 'toolbar',
                border : true,
                baseCls : 'subMenu',
                cls : 'effect1',
                dock : 'top',
                height : 25,
                items : [{
                    xtype : 'textfield',
                    name : 'SearchDownload',
                    itemId : 'SearchDownload',
                    enableKeyEvents : true,
                    fieldLabel : LANG.DOWNLOADSF3,
                    allowBlank : true,
                    minLength : 3
                }],
{

                xtype : 'dataview',
                border : false,
                cls : 'catalogue',
                autoScroll : true,
                emptyText : 'No links to display',
                selModel : {
                    deselectOnContainerClick : false
                },
                store : DownloadsStore,
                overItemCls : 'courseView-over',
                itemSelector : 'div.x-item',
                tpl : DownloadsTpl,
                id : 'cataloguedownloads'

            }]

Controller:

init : function() {

        this.control({
             // reference to the text field in the view
                 '#SearchDownload' :{
                    change: this.SearchDownloads

            }
});

SearchDownloads : function(){
            console.log('Search functionality')

        }

UPDATE 1: i was able to get hold of the listener after three characters have been entered using the below code:

Controller

    '#SearchDownload' :{
                     keyup : this.handleonChange,       
            },

         handleonChange : function(textfield, e, eOpts){

            if(textfield.getValue().length > 3){

                console.log('Three');
            }
    }

any guidance or examples on how to perform the search in the store of the data view would be appreciated.

  • 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-14T23:01:07+00:00Added an answer on June 14, 2026 at 11:01 pm

    A proper way would be to subscribe yourself to the change event of the field and check if the new value has at least 3 chars before proceeding.

    '#SearchDownload' :{ change: this.handleonChange }
    // othoer code
    handleonChange : function(textfield, newValue, oldValue, eOpts ){
          if(newValue.length >= 3){
                console.log('Three');
          }
    }
    

    Btw. I recommend you to use lowercase and ‘-‘ separated names for id’s. In your case

    itemId : 'search-download'
    

    Edit apply the filter

    To apply the filter I would use filter I guess you now the field you want to filter on? Lets pretend store is a variable within your controller than you may replace the console.log() with

    this.store.filter('YourFieldName', newValue);
    

    Second param can also be a regex using the value like in the example

    this.store.filter('YourFieldName', new RegExp("/\"+newValue+"$/") );
    

    For sure you can also use a Function

    this.store.filter({filterFn: function(rec) { return rec.get("YourFieldName") > 10; }});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to put full text search working on SQL Server 2008, however
I'm trying to put together a GUI for setting some pricing. There are three
Having some issues with this search engine I am trying to put together. I'll
Hey! I am trying to put some data from a textbox to an existing
I'm trying to use Google's Images API to search an image and put it
I'm trying put an if statement directly into a select field in rails, with
I'm trying to put a large table in a pdf file which will be
I'm trying to put some custom list adapters into their own classes to make
I'm using MongoDB with Mongoid and trying to put in place a rudimentary search
I'm trying to put a ProgressBar view below a ListView for a ListActivity. I

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.