Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    Münster
    Posts
    16
    Vote Rating
    0
    Stephan Stückmann is on a distinguished road

      0  

    Default [FNR] Grid sort state not apllied

    [FNR] Grid sort state not apllied


    Hi,

    we have a problem with applying the saved sort state of our grid, which uses clientside paging with a PagingModelMemoryProxy and BasePagingLoader.

    In Grid.doApplyStoreState() there is this line:

    Code:
    if (store.getLoader() == null && sortField != null)...
    I think this should be:

    Code:
    if ((store.getLoader() == null || !store.getLoader().isRemoteSort()) && sortField != null)...
    Or just skip the loader check, because in ListStore.sort() there is a check for the loader already?

    Kind regards,

    Stephan

  2. #2
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Or just skip the loader check, because in ListStore.sort() there is a check for the loader already?
    This is going to be a braking change.


    However i will add the check if its not using remote sort as this is realy missing

  3. #3
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Code:
    Index: user/src/com/extjs/gxt/ui/client/widget/grid/Grid.java
    ===================================================================
    --- user/src/com/extjs/gxt/ui/client/widget/grid/Grid.java	(revision 2379)
    +++ user/src/com/extjs/gxt/ui/client/widget/grid/Grid.java	(working copy)
    @@ -746,7 +746,7 @@
     
       protected void doApplyStoreState(Map<String, Object> state) {
         String sortField = (String) state.get("sortField");
    -    if (store.getLoader() == null && sortField != null) {
    +    if ((store.getLoader() == null || !store.getLoader().isRemoteSort()) && sortField != null) {
           String sortDir = (String) state.get("sortDir");
           SortDir dir = SortDir.findDir(sortDir);
           store.sort(sortField, dir);

  4. #4
    Sencha User
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Fixed in SVN as of revision 2415

  5. #5
    Ext JS Premium Member
    Join Date
    Nov 2009
    Location
    Münster
    Posts
    16
    Vote Rating
    0
    Stephan Stückmann is on a distinguished road

      0  

    Default


    That was fast, thanks!

Thread Participants: 1