Announcement

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

    12.1p ListGrid ListGridField displayed default operator not used

    Hi Isomorphic,

    please see this modified sample (v12.1p_2023-01-05).
    As you can see here after filtering, the GUI looks like it would filter using startsWith, but in reality it uses contains. The request also does not use advancedCriteria, but
    Code:
    data:{
            countryName:"d"
        },
    Click image for larger version

Name:	FilterOperator.PNG
Views:	152
Size:	93.0 KB
ID:	269298

    Either adding filterOperator to the ListGridField or setting alwaysShowOperatorIcon: true on the ListGrid fixes the issue, the request is then:
    Code:
    data:{
            operator:"and",
            criteria:[
                {
                    fieldName:"countryName",
                    operator:"startsWith",
                    value:"d"
                }
            ]
        },
    Best regards
    Blama


    countryDS:
    Code:
    isc.DataSource.create({
        ID: "countryDS",
        fields:[
            {name:"countryCode", title:"Code"},
            {name:"countryName", title:"Country", validOperators:["startsWith", "iStartsWith", "endsWith", "iEndsWith", "iregexp", "regexp"]},
            {name:"capital", title:"Capital"}
        ],
        clientOnly: true,
        testData: countryData
    })
    databound.js (broken like this with filterOperator commented out):
    Code:
    isc.ListGrid.create({
        ID: "countryList",
        width: 500,
        height: 224,
        alternateRecordStyles: true,
        showAllRecords: true,
        dataSource: countryDS,
        autoFetchData: true,
        showFilterEditor: true,
        fields: [
            { name: "countryCode" },
            { name: "countryName"}, //, filterOperator: "startsWith" },
            { name: "capital" }
        ],
        dataProperties: { useClientFiltering: false }
    })
    Attached Files

    #2
    Thanks for the report - we've fixed this and it should hit today's builds, dated January 7.

    Note that your grid will no longer issue simple-criteria in this case - your validOperators list does not include the default op based on field-type and textMatchStyle of the grid ("iContains"), so you're effectively providing "startsWith", the first entry in the array, as the default, but that op isn't compatible with the grid's textMatchStyle.
    Last edited by Isomorphic; 7 Jan 2023, 01:02.

    Comment


      #3
      Hi Isomorphic,

      I don't think the fix fixed the issue - actually it seems that now validOperators is broken. All the default operators are available.
      This is what the sample looks like for me using v12.1p_2023-01-08:
      Click image for larger version

Name:	FilterOperators.PNG
Views:	148
Size:	22.4 KB
ID:	269315

      Best regards
      Blama

      Comment


        #4
        We're seeing it work as expected with your code at the link you provided above - did you perhaps forget to change the DS or click Try It on that tab?
        Last edited by Isomorphic; 9 Jan 2023, 13:30.

        Comment


          #5
          Hi Isomorphic,

          I still see the erroneous behavior in v12.1p_2023-01-08 and v13.0p_2023-01-08 in FF108 and Edge108.
          Did you try in the online showcase as well?

          SNAPSHOT_v13.1d_2023-01-09 is working as expected, though.

          Best regards
          Blama

          Comment


            #6
            Yes, we see it working at both online links - you do need to click "Try It" when you change the DS tab, and then again when you change the code tab.

            Comment


              #7
              Hi Isomorphic,

              sorry, my bad. I did not realize that you had to do this twice.
              If I do this it's working as expected in all three versions. Thank you.

              Best regards
              Blama

              Comment


                #8
                Yes, the Try It button only applies changes to the current tab.

                We'll answer the questions in your other thread about validOperators shortly today.

                Comment

                Working...
                X