Author Topic: Search Data using textbox from table - very slow  (Read 230 times)

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 42
    • View Profile
Search Data using textbox from table - very slow
« on: May 04, 2022, 05:42:07 pm »
Sometime table going to blank when I'm writing the text for searchbox very fast,

i have used below code for search functionality,
====================================
toolbar: {
                    cls: "pq-toolbar-schedule",
                    items: [
                        {
                            type: 'textbox',
                            //label: 'Filter: ',
                            attr: 'placeholder="Type here your search keyword..."',
                            cls: "filterValue searchBox scheduleSearchField",
                            listener: { timeout: filterhandler }
                        }
                    ]
                }
================================

function filterhandler() {

    var $toolbar = this.toolbar(),
        $value = $toolbar.find(".filterValue"),
        value = $value.val(),
        //condition = $toolbar.find(".filterCondition").val(),
        //dataIndx = $toolbar.find(".filterColumn").val(),
        filterRules;

    filterRules = this.getColModel().map(function (column) {
        return { dataIndx: column.dataIndx, condition: "contain", value: value };
    })

    //call to grid filter method.
    this.filter({
        oper: 'replace',
        rules: filterRules
    });
}

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5645
    • View Profile
Re: Search Data using textbox from table - very slow
« Reply #1 on: May 04, 2022, 06:03:50 pm »
[ Only Pro members may read this post. ]

developer1

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: Search Data using textbox from table - very slow
« Reply #2 on: May 05, 2022, 12:24:21 pm »
Hi Paramvir,

Demo link : https://jsfiddle.net/kfjdheLa/1/

Search words like "chang" or tofu"

You can check the result, its just only 50 rows and take a time for searching process after click

When we search the data more than 6000 rows at that time search results gone off frequently not every time.



paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5645
    • View Profile
Re: Search Data using textbox from table - very slow
« Reply #3 on: May 05, 2022, 01:26:29 pm »
[ Only Pro members may read this post. ]
« Last Edit: May 05, 2022, 01:32:49 pm by paramvir »

developer2

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Search Data using textbox from table - very slow
« Reply #4 on: May 06, 2022, 07:50:35 pm »
We have used same code but still facing the same issue

Could you arrange remote support for the same?

So we can easily identify the issue which we are facing.


paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 5645
    • View Profile
Re: Search Data using textbox from table - very slow
« Reply #5 on: May 06, 2022, 09:56:27 pm »
[ Only Pro members may read this post. ]