Announcement

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

    Unexpected behavior when using visibleWhen with tabs and showFilterEditor

    SmartClient Version: v13.1p_2026-02-03/Enterprise Deployment (built 2026-02-03)

    Hi, I’m having an issue in my application that was quite hard to reproduce, since it doesn’t occur in the showcase. However, it does happen with the following test case:

    Code:
    <!DOCTYPE html>
    <HTML>
    <HEAD>
        <meta charset="UTF-8">
        <link rel="preconnect" href="https://fonts.googleapis.com"/>
        <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin/>
        <link rel="preload" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"
              as="style"/>
        <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap"/>
        <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
        <SCRIPT SRC="isomorphic/system/modules-debug/ISC_History.js?isc_version=13.1-p20260203.js"></SCRIPT>
        <SCRIPT>isc._lastModule = 'History';</SCRIPT>
        <SCRIPT SRC="isomorphic/system/modules-debug/ISC_FileLoader.js?isc_version=13.1-p20260203.js"></SCRIPT>
        <SCRIPT>isc._lastModule = 'FileLoader';</SCRIPT>
        <SCRIPT type="text/javascript">
            isc.FL.defaultSkin = 'Shiva';
        </SCRIPT>
        <SCRIPT>window.isomorphicDir = "./isomorphic/";</SCRIPT>
        <SCRIPT>window.isc_useSimpleNames = false;</SCRIPT>
        <script type='text/javascript'
                src='./isomorphic/system/modules-debug/ISC_Core.js?isc_version=13.1-p20260203.js'></script>
        <script type='text/javascript'>isc._lastModule = 'Core';</script>
        <script type='text/javascript'
                src='./isomorphic/system/modules-debug/ISC_Foundation.js?isc_version=13.1-p20260203.js'></script>
        <script type='text/javascript'>isc._lastModule = 'Foundation';</script>
        <script type='text/javascript'
                src='./isomorphic/system/modules-debug/ISC_Containers.js?isc_version=13.1-p20260203.js'></script>
        <script type='text/javascript'>isc._lastModule = 'Containers';</script>
        <script type='text/javascript'
                src='./isomorphic/system/modules-debug/ISC_Grids.js?isc_version=13.1-p20260203.js'></script>
        <script type='text/javascript'>isc._lastModule = 'Grids';</script>
        <script type='text/javascript'
                src='./isomorphic/system/modules-debug/ISC_Forms.js?isc_version=13.1-p20260203.js'></script>
        <script type='text/javascript'>isc._lastModule = 'Forms';</script>
        <script type='text/javascript'
                src='./isomorphic/system/modules-debug/ISC_DataBinding.js?isc_version=13.1-p20260203.js'></script>
        <script type='text/javascript'>isc._lastModule = 'DataBinding';</script>
        <SCRIPT SRC='./isomorphic/skins/Shiva/load_skin.js?isc_version=13.1-p20260203.js'></SCRIPT>
        <script type="text/javascript"
                src="./isomorphic/locales/frameworkMessages.properties?13.1-p20260203"></script>
        <script type="text/javascript">
            isc.setAutoDraw(false);
            isc.Auth.setCurrentUser({userId: "me"});
            isc.Auth.setRoles(["ROLE_ADMIN", "ROLE_FOO"]);
        </script>
    </HEAD>
    <BODY STYLE="overflow: hidden;">
    <script>
        isc.ListGrid.create({
            ID: "fooGrid",
            fields: [
                {name: "aField"}
            ]
        });
    
        isc.ListGrid.create({
            ID: "barGrid",
            showFilterEditor: true,
            fields: [
                {name: "aField"}
            ]
        });
    
        isc.TabSet.create({
            ID: "fooBarTabSet",
            autoDraw: true,
            width: "100%",
            height: "100%",
            tabs: [
                {
                    name: "foo",
                    title: "First tab",
                    visibleWhen: {fieldName: "auth.roles", operator: "equals", value: "ROLE_ADMIN"},
                    pane: fooGrid
                },
                {
                    name: "bar",
                    title: "Second tab",
                    visibleWhen: {fieldName: "auth.roles", operator: "equals", value: "ROLE_ADMIN"},
                    pane: barGrid
                }
            ]
        });
    </script>
    </BODY>
    </HTML>
    Basically, the first time the second tab is selected, it appears empty. If I reselect the first tab and then select the second one again, the grid is shown correctly (the barGrid has the filterEditor) :

    Click image for larger version

Name:	primo.gif
Views:	9
Size:	251.3 KB
ID:	277091

    The issue does not occur if there are no visibleWhen conditions on the tabs, or if showFilterEditor is not set on the barGrid.

    If I use enableWhen instead of visibleWhen, everything works as expected.

    Another strange behavior: if I try removing visibleWhen only from the first tab, the first time I try to select the second tab it requires two clicks:

    Click image for larger version

Name:	secondo.gif
Views:	9
Size:	98.3 KB
ID:	277092



    #2
    This was caused by a subtle off bugfix for another bug - sorry about that, and thanks for the super clear test case!

    This is fixed for tomorrow's builds. We have had some trouble with build breakage lately so it might be another day. It would be great if you can confirm the fix!

    Comment


      #3
      Thank you for the very quick fix!
      I don’t see the new 13.1 build yet, but I will make sure to test it as soon as it becomes available.

      Comment


        #4
        SmartClient Version: v13.1p_2026-02-08/Enterprise Deployment (built 2026-02-08)

        I can confirm that it's working now, thank you very much!

        Comment

        Working...
        X