Announcement

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

    Adding alwaysShowOperatorIcon = true auto fetches data

    Looking at v13.0, create this example (I used this example and pasted this code in):

    Code:
    isc.ListGrid.create({
        // alwaysShowOperatorIcon: true,
        dataSource: supplyItem,
        height:500,
        showFilterEditor: true,
        width: "100%"
    });
    You'll see that no data is loaded upon initialization. But then, comment out the line alwaysShowOperatorIcon: true, and see what happens (the grid automatically fetches data)... Is this intentional behavior?

    #2
    In addition to this (and another post I'm working on), I've noticed that setting initialCriteria on the grid, doesn't affect the fetch being caused by this property. Only when autoFetchData is set to true, the initial criteria are used.

    So in my opinion, set alwaysShowOperatorIcon to true should not cause a fetch.

    Comment


      #3
      Hi,

      regarding initialCriteria this is what's doc'd here.
      Criteria to be used when autoFetchData is set.
      No idea about alwaysShowOperatorIcon, this also seems strange to me.

      Best regards
      Blama

      Comment


        #4
        The docs are correct when it comes to initialCriteria being used with autoFetchData set. And - if you add a filter editor and change something there - they seem to be used as well.

        But that bug (as I think it is) with the alwaysShowOperatorIcon causing a fetch was misleading. The grid behaved like autoFetchData was true but the initialCriteria were not used. Since I use quite some customization I took me a while to find out that autoFetchData was not set by me. ;-)

        Comment


          #5
          Thanks for the report - we've made a fix for this unexpected fetch, which you'll see in builds dated April 12 and later. Internal logic considers whether showing the operatorIcon on operator-change should require a filter, and it considered changing from no specified operator to a specific one to be a change, even if they would eventually use the same operator (eg, a text field with no specified operator will use iContains by default, so setting it to iContains should not cause a filter).
          Last edited by Isomorphic; 11 Apr 2022, 01:51.

          Comment

          Working...
          X