Announcement

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

    The issue with search filter above grid and a large number of columns

    SmartGWT 13.0

    Sometimes the application crashes with such an error. I have a feeling that setFieldSearchOperator() changes the column widths and altering the list of currently visible columns.
    The problem occurs when fetching data for the grid with the visible filter bar enabled and a larger number of columns that do not fit on the screen.
    Unfortunately, it doesn't happen always. I couldn't build a short code snippet to reproduce the error.

    As a result, the size of the array over which this loop iterates changes.
    You can see that Items is a 13-element array, while previously the variable length was set to 15.


    Click image for larger version  Name:	Zrzut ekranu 2024-04-8 o 22.22.18.png Views:	0 Size:	635.0 KB ID:	272118

    I debugged it deeper, and the call stack responsible for this phenomenon is as follows.
    Here, two columns are being removed from the list of visible columns, which later causes an error:

    Click image for larger version  Name:	Zrzut ekranu 2024-04-8 o 23.00.14.png Views:	0 Size:	696.4 KB ID:	272119


    The proposed fix for the error is to create a copy of the array (line 11: const tmpItems =items;). It works.


    Click image for larger version  Name:	Zrzut ekranu 2024-04-8 o 22.16.47.png Views:	0 Size:	209.1 KB ID:	272116
    Attached Files
    Last edited by Sanmargar; 8 Apr 2024, 13:23.

    #2
    Thanks for reporting this issue. We've tried to address it in a different way that should avoid running the code that removes the items during updateFilterOperators(). The fix has been applied to SC/SGWT 13.0, and will be in the nightly builds dated 2024-04-12 and beyond.

    If this doesn't fix it for you can you provide a screen capture video (i.e. a "hypercam"-style capture) that shows exactly what you're doing when the problem happens? Repro code would be ideal, but you said that's not an option.

    Comment


      #3
      If your issue has been resolved, please also confirm that here. Since there was never a repro case, that will help our understanding of the issue.

      Comment


        #4
        I can confirm that in version 13.1-d20240416 the issue does not occur.

        Thank you very much.

        Will it be helpful if I also check in 13.0? Previously, it occurred in both 13.0 and 13.1.

        Last edited by Sanmargar; 20 Apr 2024, 12:39.

        Comment


          #5
          The fix was only applied to SGWT/SC 13.0, so what you report is surprising. Since 13.1 was split off back in December 2021, it's possible that a separate change fixed it in 13.1, except that you say it was just occurring there prior to the build in question.

          Is it possible that you actually tested 13.0 instead of 13.1? If not, yes, please check 13.0 for us.

          Comment


            #6
            I apologize. I mixed up the test results. Too many things at once.

            Now I've repeated the tests:

            macOS 14.4.1
            Chrome 124.0.6367.62
            GWT 2.11

            this is a log:

            13.1-d20231122 - error
            13.1-d20240416 - error

            13.0-p20240420 - ok
            13.0-p20240415 - ok
            13.0-p20240412 - ok
            13.0-p20240410 - error
            13.0-p20240423 - ok
            13.0-p20240410 - error
            13.0-p20240423 - ok

            13.1-d20240423 - error

            13.0-p20240412 - ok
            Last edited by Sanmargar; 23 Apr 2024, 10:42.

            Comment


              #7
              Thanks for this information. We'll port the fix forward to 13.1.

              Comment

              Working...
              X