Announcement

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

    ListGridField.visibleWhen bug

    SmartClient Version: v13.1p_2025-09-19/AllModules Development Only (built 2025-09-19)

    Chrome on MacOS Tahoe

    Hi, I think I’ve found a bug related to ListGridField.visibleWhen, which doesn’t seem to be working.
    In fact, the first column ends up being visible, even if device.isPhone is false on desktop:

    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width: 870, height: 224,
        dataSource: countryDS,
        autoFetchData: true,
        fields: [
            {
                name: "countryCode",
                visibleWhen: {fieldName: "device.isPhone", operator: "notEqual", value: false},
                title: "Flag", width: 65, type: "image", imageURLPrefix: "flags/24/", imageURLSuffix: ".png"
            },
            {name: "countryName", title: "Country"},
            {name: "capital"},
            {name: "government", width: 120},
            {name: "independence", title: "Nationhood", width: 115},
            {name: "population", title: "Population"},
            {name: "area", title: "Area"},
            {name: "gdp"}
        ]
    
    })
    in the developer console, with whenRules at debug level, I see this "depending on£ log, but no actual evaluation:

    Code:
    18:09:34.626:MUP1: DEBUG:whenRules:countryList:Create whenRule: countryList_countryCode_visibility, applyWhen {
        "fieldName":"device.isPhone",
        "operator":"notEqual",
        "value":false
    } to target {targetObjectType: "ListGridField",
    fieldName: "countryCode",
    component:[ListGrid ID:countryList]} depending on [device.isPhone]
    I also noticed that ListGridField.enableWhen is documented as well, but it doesn’t seem to have any effect either.
    Also, what exactly is enableWhen supposed to do on a ListGridField?
    Last edited by claudiobosticco; 19 Sep 2025, 08:18.

    #2
    Thanks for the report, Claudio. This has been fixed in builds available immediately.

    Comment


      #3
      SmartClient Version: v13.1p_2025-09-21/Enterprise Deployment (built 2025-09-21)

      Hi, I confirm that the issue is now resolved, thank you very much

      Comment


        #4
        Regarding the enableWhen, I see that the column has a disabled style on the header, which however disappears if I (unsuccessfully) try to resize the column with drag-resize.

        The column is still 'usable' with the advanced sorting and filtering features, but that seems acceptable to me.

        Comment

        Working...
        X