Announcement

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

    12.0p Sort indicator display wrong after filterData() in grouped ListGrid with sortByGroupFirst

    Hi Isomorphic,

    please see this modified sample (v12.0p_2018-12-19), where repeated clicks on filterData() change the display of the sort indicators.

    "filterData unitCost" clicked twice:
    Click image for larger version

Name:	Problem with sort indicators.gif
Views:	80
Size:	47.9 KB
ID:	256238

    Code:
    isc.ListGrid.create({
        ID:"dsListGrid", 
        width: "100%",
        height: "100%",
        autoFetchData: false,
        canEdit: true,
        sortByGroupFirst: true,
        //groupStartOpen: "none",
        canMultiGroup: true,
        groupByField: ["category", "nextShipment"],
        initialSort: [
            {property: "units", direction: "ascending"},
            {property: "SKU", direction: "ascending"}
        ],
        dataSource: "supplyItem",
        showFilterEditor: false,
        implicitCriteria: { _constructor: "AdvancedCriteria", operator: "and",
            criteria: [ { fieldName: "units", operator: "isNull" } ]
        },
        fields:[
            {name:"itemID"},
            {name:"itemName"},
            {name:"SKU"},
            {name:"description"},
            {name:"category", hidden: true, canHide:false},
            {name:"units"},
            {name:"unitCost"},
            {name:"nextShipment"}
        ],
    });
    
    isc.IButton.create({
        ID:"fetchButton", width: 200,
        title:"Fetch no criteria",
        click : function () {
            dsListGrid.fetchData();
        }
    });
    
    isc.IButton.create({
        ID:"filterDataButton", width: 200,
        title:"filterData unitCost",
        click : function () {
               dsListGrid.filterData({ _constructor: "AdvancedCriteria", operator: "and",
                                         criteria: [ { fieldName: "unitCost", operator: "equals", value: 0 } ]
            }, null, { textMatchStyle: "exact" });
        }
    });
    
    isc.IButton.create({
        ID:"filterDataButton2", width: 200,
        title:"filterData unitCost+itemID",
        click : function () {
               dsListGrid.filterData({ _constructor: "AdvancedCriteria", operator: "and",
                                         criteria: [ { fieldName: "unitCost", operator: "equals", value: 0 },
                                                     { fieldName: "itemID", operator: "equals", value: 3291}
                                                   ]
            }, 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, filterDataButton, filterDataButton2, 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
    This has been fixed back to SC 10.1p, effective nightly builds dated 2018-12-22 and beyond.

    Comment


      #3
      Hi Isomorphic,

      I can see this one is fixed using v12.0p_2018-12-26.

      Best regards
      Blama

      Comment

      Working...
      X