Announcement

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

    12.0p/12.1p/13.0p SelectItem sorting and data loading issues

    Hi Isomorphic,

    retesting this testcase I noticed two problems with SelectItem sorting, one general, one 13.0p (v12.0p_2022-09-10, v12.1p_2022-09-09, v13.0p_2022-09-09).

    13.0p issue:
    Please open this sample in 12.0p, 12.1p and 13.0p, as well as Developer Console and watch the requests for supplyCategory.
    The 12.x requests have a sortBy:["categoryName"] (expected, because of sortByDisplayField docs, and also because it just makes sense), the 13.0p request does not (unexpected).
    Strangely enough, the data seems to be sorted in server's response here anyway, but this might be a coincidence.

    General issue in all three versions:
    Add sortField:"categoryName" to the categoryName-field definition and start the sample.
    On every open of the pickList by clicking the SelectItem with the mouse or via keys Alt-Down, a new request is sent to the server (unexpected). This is not the case without sortField.

    Best regards
    Blama

    #2
    Hi Blama
    On the first issue ("13.0 issue"), when we visit the sample you reference, running against SmartClient 12.1p: https://www-demos.smartclient.com/sm...lectsDatabound
    ... we're not seeing sortBy:["categoryName"] in the datasource request to fetch the pickList data

    The request (copied from the Developer Console) has this payload:
    Code:
    {
        dataSource:"supplyCategory",
        operationType:"fetch",
        componentId:"isc_PickListMenu_0",
        startRow:0,
        endRow:75,
        textMatchStyle:"startsWith",
        resultSet:[ResultSet ID:isc_ResultSet_0 (dataSource: supplyCategory, created by: isc_PickListMenu_0)],
        callback:{
            caller:[ResultSet ID:isc_ResultSet_0 (dataSource: supplyCategory, created by: isc_PickListMenu_0)],
            methodName:"fetchRemoteDataReply"
        },
        willHandleError:true,
        showPrompt:false,
        prompt:"Finding Records that match your criteria...",
        requestId:"supplyCategory$6270",
        internalClientContext:{
            requestIndex:1
        },
        fallbackToEval:false,
        componentContext:"isc_DynamicForm_0.categoryName",
        lastClientEventThreadCode:"XRP6",
        bypassCache:true,
        dataProtocol:"getParams"
    }
    Can you clarify whether we're looking at the right sample / whether we're misunderstanding this report?

    We do see the second issue ("General issue in all three versions") and have a developer taking a look

    Thanks

    Comment


      #3
      Edit: Misread your post, will double check.

      Comment


        #4
        We've now implemented a fix for the second issue in the 13.1 branch. This should be present in the next nightly build (dated Sep 16 or above), and will be backported to 13.0 and 12.x in the coming days

        Regards
        Isomorphic Software

        Comment


          #5
          Hi Isomorphic,

          this *really* confused me. I could not reproduce, but was sure to remember what I saw. Could not reproduce locally in v12.1p_2022-08-10 and an April version either.
          Now got it working.
          • Start the sample (affects 12.0p, 12.1p and also(!) 13.0p), tested in FF104 and Chromium 104.
          • No sortBy:["categoryName"] (expected)
          • Add sortField: "categoryName" to the sample for the supplyCategory SelectItem
          • Re-Start the sample
          • Now with sortBy:["categoryName"] (expected)
          • Remove sortField: "categoryName" from the sample again
          • Now still with sortBy:["categoryName"] (unexpected)
          Best regards
          Blama

          Comment


            #6
            Thanks for the clear test case.
            We've got a fix for this other issue as well. It'll hit 13.1 tonight and be backported to the earlier branches in the upcoming days

            Regards
            Isomorphic Software

            Comment


              #7
              Hi Isomorphic,

              I can see both issues are fixed in SNAPSHOT_v13.1d_2022-09-18 and the first one as well in 12.1p/13.0p.

              Best regards
              Blama

              Comment


                #8
                Hi Isomorphic,

                out of interest, what is the root cause for the 2nd issue (sortBy kept after removing sortField).
                Is there some kind of caching in the framework for Widgets?

                Best regards
                Blama

                Comment


                  #9
                  Hi Blama
                  The fix has now been ported back to 13.0 and the 12.x branches

                  The root cause for the second issue is an implementation detail of the framework so shouldn't be something you need to know, but you're correct that it's due to cacheing - specifically for pickLists. The cachePickListResults setting (enabled by default) causes pick-list based form items (SelectItems and ComboBoxItems) to share / reuse the same drop down list configuration if possible. In this case the same drop down list was being used by the sorted form item, then re-used when you ran the sample again - but the sort wasn't being cleared as it should have been

                  Regards
                  Isomorphic Software

                  Comment


                    #10
                    Hi Isomorphic,

                    ah, OK. Nice to know. By setting cachePickListResults: false I was able to circumvent the bug in v13.0p_2022-09-17.
                    I saw that API before and assumed it had a different use, good to learn something.

                    Best regards
                    Blama

                    Comment


                      #11
                      Hi Isomorphic,

                      I can see that this is fixed without the need of cachePickListResults: false in v12.0p_2022-09-20, v12.1p_2022-09-20, v13.0p_2022-09-20 as well.

                      Best regards
                      Blama

                      Comment

                      Working...
                      X