Announcement

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

    Clear Filter does not clear all filter editor form items

    The 'Clear Filter' menu item form the FilterEditor of the ListGrid does not clear the filter if the column is "out of view" when there are a lot of columns.

    Problem can be reproduced on the SmartClient Adaptive Filter example on http://smartclient.com/#adaptiveFilterFS using SmartClient Version: v9.1p_2014-08-08/Pro Deployment (built 2014-08-08) on Firefox 31.0 and Chrome 37.0. It can be reproduced in the example by adding a bigger width to the fields in the ListGrid.

    Code:
    isc.ListGrid.create({
        ID: "supplyList",
        width:500, height:300, alternateRecordStyles:true,
        dataSource: supplyItem,
        fields:[
            {name:"SKU", width:500},
            {name:"itemName", width:500},
            {name:"description", width:500},
            {name:"category", width:500}
        ],
        autoFetchData: true,
        showFilterEditor: true,
        filterOnKeypress: true,
        fetchDelay: 500
    });
    
    // ---------------------------------------------------------------------------------------
    // The code that follows is just to illustrate when SmartClient has needed to contact the
    // server. It is not part of the example.
    
    supplyItem.addProperties({
    
        transformResponse: function (dsResponse) {
            if (this.dataFormat == "iscServer") this.updateRowCountLabel(dsResponse);
        },
        // This approach logs simulated server trips for SmartClient LGPL, where all DataSources
        // in the Feature Explorer are converted to clientOnly:true so that no server is required.
        getClientOnlyResponse : function (dsRequest) {
            var dsResponse = this.Super("getClientOnlyResponse", arguments);
            this.updateRowCountLabel(dsResponse);
            return dsResponse;
        },
        updateRowCountLabel : function (dsResponse) {
            serverCount.incrementAndUpdate(dsResponse.totalRows, 
                                           dsResponse.startRow, 
                                           dsResponse.endRow);
            // Flash the label
            var bgColor = serverCount.backgroundColor;
            serverCount.setBackgroundColor("ffff77");
            isc.Timer.setTimeout("if (serverCount) serverCount.setBackgroundColor('" + bgColor +"');", 500);
        }
    })
    isc.Label.create({
        ID: "serverCount",
        top: 320, padding: 10,
        width: 500, height: 40,
        border: "1px solid grey",
        contents: "<b>Number of server trips: 0</b>",
        count: 0,
        incrementAndUpdate: function (totalRows, startRow, endRow) {
            this.count++;
            this.setContents("<b>Number of server trips: " + this.count + 
                             "<br/>Total rows in this filter set: " + totalRows +
                             "<br/>Last range of records returned: " + 
                             startRow + " to " + endRow + "</b>");
        }
    });

    Steps to reproduce:

    1) Open the Adaptive Filter example on http://smartclient.com/#adaptiveFilterFS with the modification above

    2) Enter a value (e.g. '45300') in the SKU filter editor and press Enter
    => The list is filtered according to the filter

    3) Scroll all the way to the right to show the last column (e.g. Category in this example)

    4) Right click on the header and select 'Clear Filter' menu item to clear the menu
    ERROR> Nothing happens, the filtered results is still displayed. Expecting the filter to be cleared and displays the full list

    It seems that when 'Clear Filter' is invoked, ListGrid.filterEditor._editRowForm.items only contains displayable items and therefore does not iterate to clear the form values in setValuesAsCriteria(). This is due to when makeEditForm() was called, the items were created from getDrawnFields() which does not contains all the fields in the ListGrid.

    ----------------
    SmartClient Version: v9.1p_2014-08-08/Pro Deployment (built 2014-08-08)
    Windows 7 Firefox 31.0 and Chrome 37.0.2062.103 m
    Last edited by cyuen; 11 Sep 2014, 08:35.

    #2
    Any feedback regarding this issue?

    Comment


      #3
      This was addressed quite recently but the thread was never updated - our apologies. Please try the latest nightly build and let us know if the problem persists for you.

      Regards
      Isomorphic Software

      Comment


        #4
        Installed SmartClient Version: v9.1p_2014-09-19/Pro Deployment (built 2014-09-19) and tested on Firefox 32.0 and Chrome 37.0 but the problem is still reproducible.

        ----------------
        SmartClient Version: v9.1p_2014-09-19/Pro Deployment (built 2014-09-19)
        Windows 7 Firefox 32.0 and Chrome 37.0.2062.120 m
        Last edited by cyuen; 22 Sep 2014, 11:36.

        Comment


          #5
          Hmm - we thought this was resolved. We've assigned a developer to take a look.
          We'll follow up when we have more information for you.

          Regards
          Isomorphic Software

          Comment


            #6
            Just wonder if there is any update or ETA on this issue. Thanks.

            Comment


              #7
              This issue has been resolved. Please try the next nightly build, dated Sep 29.
              Regards
              Isomorphic Software

              Comment

              Working...
              X