Announcement

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

    ListGrid filtering with filter expressions and filterOnKeyPress=true resets when scrolling horizontally

    Hello,

    We have a list grid where filter expressions and filterOnKeyPress is enabled. When we enter an expression, the listgrid is filtering as expected.
    But if we scroll (after applying the filter) to the side (left or right) - far enough so that the filtered column is not visible in the scroll area, and then scroll back to the filtered column, then the filter is cleared and all columns are shown again.

    Steps:
    1. Enter expression "=(val0_2)" (without the quotation marks) in column field "field 2".
    2. Scroll all the way to the right, so that the column "field 2" is no longer visible
    3. Scroll all the way back to the left, making the "Field 2" visible again.
    4. Observe that the filter is cleared.

    We are using SmartGwt LGPL 12.1-p20201102 on Mac OS X 10.15.7. Tested and verified in Chrome 87.0.4280.67 and Safari 14.0.1. Also tested and verified on Windows 10 Home and Chrome 87.0.4280.66.

    Hope you guys can take a look and advice.
    Best Regards
    Rasmus


    We are using the following test app:

    Code:
    public void onModuleLoad() {
        List<Canvas> members = new ArrayList<>();
        members.add(new Label("SmartGwt Version: " + getScVersion()));
        members.add(testListGridAdvancedFilteringHorizontalScroll());
    
        Layout panel = new VLayout();
        panel.setWidth100();
        panel.setHeight100();
        panel.setMembers(members.toArray(new Canvas[0]));
        panel.draw();
    }
    
    private Canvas testListGridAdvancedFilteringHorizontalScroll() {
        int numCols = 50;
        List<ListGridField> fields = new ArrayList<>();
        for (int i = 0; i < numCols; i++) {
            fields.add(new ListGridField("f" + i, "field " + i, 120));
        }
    
        ListGrid grid = new ListGrid();
        grid.setWidth100();
        grid.setHeight(300);
    
        grid.setFilterOnKeypress(true);
        grid.setShowFilterEditor(true);
        grid.setAllowFilterExpressions(true);
        grid.setAllowFilterOperators(true);
        grid.setAlwaysShowOperatorIcon(false);
    
        grid.setDataFetchMode(FetchMode.LOCAL);
        grid.setAutoFetchData(true);
        grid.setFields(fields.toArray(new ListGridField[0]));
        grid.setDataSource(new TestListGridAdvancedFilteringHorizontalScrollDS(numCols));
    
        return grid;
    }
    
    private class TestListGridAdvancedFilteringHorizontalScrollDS extends AbstractGwtRpcDS {
        private final int numCols;
    
        TestListGridAdvancedFilteringHorizontalScrollDS(int numCols) {
            super();
            this.numCols = numCols;
            for (int i = 0; i < numCols; i++) {
                addField(new DataSourceTextField("f" + i, "field " + i));
            }
        }
    
        @Override
        protected void executeFetch(DSRequest request) {
            List<ListGridRecord> records = new ArrayList<>();
            for (int i = 0; i < 10000; i++) {
                ListGridRecord record = new ListGridRecord();
                for (int j = 0; j < numCols; j++) {
                    record.setAttribute("f" + j, "val" + i + "_" + j);
                }
                records.add(record);
            }
            processResponse(request, records);
        }
    }

    #2
    Hi Rn
    Just a quick note to let you know we are reproducing this problem and have a developer investigating. We will let you know as soon as we have a fix

    Regards
    Isomorphic Software

    Comment


      #3
      We've now made a change to address this issue. Please try the next nightly build dated Dec 2 or above

      Regards
      Isomorphic Software

      Comment


        #4
        Thanks!
        We will test and get back to you.

        Comment


          #5
          Hello,
          Issue has been fixed.
          Thanks!

          Comment

          Working...
          X