Announcement

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

    12.0p Unnecessary "Grouping data" after fetchData() and filterData() that do not result in server contact

    Hi Isomorphic,

    please see this modified sample (v12.0p_2018-12-19), where repeated clicks on fetchData() and filterData() that do not result in server contact, do result in an unnecessary "Grouping data" window nevertheless.
    This is similar to this issue, where the same happened for display of the filter row.

    Code:
    isc.ListGrid.create({
        ID:"dsListGrid", 
        width: "100%",
        height: "100%",
        autoFetchData: false,
        canEdit: true,
        groupByField: "category",
        initialSort: [
            {property: "category", direction: "ascending"},
            {property: "units", direction: "ascending"}
        ],
        dataSource: "supplyItem",
        showFilterEditor: true,
        implicitCriteria: { _constructor: "AdvancedCriteria", operator: "and",
            criteria: [ { fieldName: "units", operator: "isNull" } ]
        }
    });
    
    isc.IButton.create({
        ID:"fetchButton", width: 200,
        title:"Fetch no criteria",
        click : function () {
            dsListGrid.fetchData();
        }
    });
    
    isc.IButton.create({
        ID:"fetchFilteredButton", width: 200,
        title:"filterData category",
        click : function () {
               dsListGrid.filterData({ _constructor: "AdvancedCriteria", operator: "and",
                                         criteria: [ { fieldName: "category", operator: "equals", value: "Office Paper Products" } ]
            }, null, { textMatchStyle: "exact" });
        }
    });
    
    isc.IButton.create({
        ID:"showImplicitCriteria", width: 200,
        title:"Show ImplicitCriteria",
        click : function () {
            isc.say(isc.JSON.encode(dsListGrid.getImplicitCriteria()))
        }
    });
    
    isc.HStack.create({
        ID:"hStack",
        membersMargin:10,
        members:[ fetchButton, fetchFilteredButton, showImplicitCriteria]
    });
    
    isc.VLayout.create({
        membersMargin:10,
        width: "100%",
        height: "100%",
        members:[ dsListGrid, hStack]
    });
    This is minor to me, I found it trying to create another testcase.

    Best regards
    Blama

    #2
    We've fixed this in SC 12.0 and newer branches for nightly builds dated 2019-01-01 and beyond. As this is an optimization and potentially changes behavior (skipping regrouping, redrawing, etc.), we don't plan to port it back further.

    Comment


      #3
      Hi Isomorphic,

      I can see this is fixed using v12.0p_2019-01-05. As I'm using 12.0p finally, this is fine for me.

      Best regards
      Blama

      Comment

      Working...
      X