Results 1 to 2 of 2

Thread: Remote filtering with Delay

  1. #1
    Sencha User
    Join Date
    Jan 2018
    Posts
    1

    Default Remote filtering with Delay

    Hello Ext Js users !

    I'm having an issue with the remote filter option on a store.

    My problem is : That i Have a store defined like follows :


    Code:
    Ext.define('MyApp.view.client.ClientListModel', {
        extend: 'Ext.app.ViewModel',
        alias: 'viewmodel.clientlist-vm',
        
        requires:[
            'MyApp.model.Client'
        ]
        ,data: {
            name: 'MyApp'
        }
        ,stores:{
            clients:{
                type:'clients'
                ,fields:['clt_id', 'clt_nom','clt_est_archive']
                ,autoLoad:true
                ,remoteSort: true
                ,remoteFilter: true
                
                ,filters: [
                    { 
                        property: 'clt_nom',
                        value: '{clientFieldRef.value}'
                    },
                    { 
                        property: 'clt_est_archive',
                        value: 0
                    }
                ]
            }
        }
    });
    


    This grid has a research field in the tbar. Here is the definition of the grid

    Code:
    tbar: [
            {
                xtype :'textfield',
                maxLength:50,
                enforceMaxLength:true,
                fieldLabel :'Recherche ',
                emptyText : 'Nom du client',
                maskRe:/[^;]/,
                id:'clientTextField',
                reference:'clientFieldRef',
                publishes:['value']
    
            }
    This is working well but I have a problem. When my user fast type his client name (e.g : tmg ), 3 requests are sent to the server, but the longest request is the last to arrive and is the one that is used by the remote sort function.

    In my example my user will type tmg but the results displayed are client with a T in their naime.

    How can I avoid this ? Can I delay the remote filter ?

    Thank you

  2. #2
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Hi--,

    Perhaps check out the checkChangeBuffer: http://docs.sencha.com/extjs/6.5.3/c...ckChangeBuffer

    Best!
    Bryan

Similar Threads

  1. Replies: 1
    Last Post: 21 May 2015, 6:04 AM
  2. Replies: 3
    Last Post: 27 Sep 2011, 10:39 AM
  3. Remote Filtering for Grids
    By stan229 in forum Ext GWT: Discussion
    Replies: 0
    Last Post: 9 Jul 2009, 10:07 AM
  4. Remote filtering with paging
    By seb2nim in forum Ext GWT: Help & Discussion (1.x)
    Replies: 1
    Last Post: 26 Jan 2009, 7:12 AM
  5. Remote Filtering on table
    By drenda81 in forum Ext GWT: Help & Discussion (1.x)
    Replies: 0
    Last Post: 11 Jul 2008, 11:48 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •