Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TreeGrid setFetchDelay not working

    Hello.
    Using the smartgwt 2.4 and noticed that first the tree grid does not use the default 300ms delay for filtering.
    If I try to use grid.setFetchDelay(500); for example it also does not apply it.

    Is this normal or is a bug?
    Because it is not that good to have a query for every character the user enters in the filter editor.

    #2
    This doesn't seem to make sense since the TrreGrid is not involved in when the FilterEditor decides to issue fetches. If you think there's an issue here, indicate how to reproduce it with a sample.

    Comment


      #3
      Ok. here it is:

      Code:
          public void onModuleLoad() {
              SC.showConsole();
              TreeGrid tg = new TreeGrid();
              DataSource ds = new DataSource();
              DataSourceTextField a = new DataSourceTextField("a", "A");
              ds.setFields(a);
              ds.setDataURL("abc");
              tg.setDataSource(ds);
              ListGridField aa = new ListGridField("a");
              aa.setCanFilter(true);
              tg.setFields(aa);
              tg.setShowFilterEditor(true);
              tg.setFilterOnKeypress(true);
              tg.setFetchDelay(1000);
              tg.draw();
          }
      If you notice in console, every keypress creates a fetch request, it does not matter if you put setFetchDelay of 100, 1000, 1000000....
      If you use a listgrid instead, it works as expected.

      Comment


        #4
        Thanks, this has been fixed.

        Comment


          #5
          Ok, great then.

          Comment

          Working...
          X