Announcement

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

    ListGrid Cache Incorrectly Invalidated

    Configuration:
    ListGrid is configured with dataProperties having useClientFiltering:false and useClientSorting:false. We have custom sorting/filtering implementation on the server and do not rely on local implementation.

    Scenario:
    There are less than a page of results in a list grid and filterData is invoked on the data source. Make sure the list is sorted on some column.

    Issue:
    The cache gets invalidated and as a result the list flashes. As a side effect currently selected record is not restored.

    Investigation:
    I noticed the cache gets invalidated in ResultSet.updateCacheData right near the bottom of the method there is a piece of code that changed in SC v9.1 on 2014-08-08:
    Code:
    if(!filteringOnClient && (!this.shouldUpdatePartialCache()) || this.allMatchingRowsCached()))
    {
         this._doSort()
    }
    the call to allMatchingRowsCached was newly added in that version of smart client. Commenting it out made it work correctly.

    Could you offer explanation for this change and potential ideas to resolve it?

    SmartClient Version:
    v9.1p_2014-09-30/Pro Deployment (built 2014-09-30). Occurs on all browsers.
    Last edited by alu; 30 Oct 2014, 13:45.

    #2
    The change was added to allow re-sorting on the client-side in a case where it should have been allowed (but previously wasn't).

    However, an additional check should be in place to ensure client side sorting is not actually disabled before we call doSort. We've now added such a check and it should resolve your issue.
    Please try the next available nightly build (Nov 1 or above)

    Regards
    Isomorphic Software

    Comment


      #3
      Thanks for the fix and quick reply. Could you confirm that the only change that was necessary was:

      Code:
          // reapply current sort to localData if appropriate
      
          if (!filteringOnClient &&
              (!this.shouldUpdatePartialCache() || this.allMatchingRowsCached()) &&
              this.canSortOnClient())
          {
              this._doSort();
          }
      We are close to our release and cannot afford to update entire SC version.

      Comment

      Working...
      X