Skip to main content
chriss4489
July 18, 2023
Solved

Tabs no longer functioning properly, not switching from one tab to the next when clicking on each tab.

  • July 18, 2023
  • 6 replies
  • 0 views

I added a tab component to an interface I was building and added 4 additional tabs to the 3 that come with it automatically. I had all 7 formatted the same and working perfectly fine as each was clicked. However, I discovered that I had missed a needed tab that meant to go in the 5th slot, so I added another tab, moved it up to the 5th spot in the component configuration section, and then went through that it along with the 3 that moved down were all updated and formatted correctly. Now however, when clicking through the tabs, only the first 4 tabs become selected and show their given information below it, the new tab along with the others that moved down the list are selectable now, clicking on them just updates the page but does not change the selected button. I've been through the code and everything looks as it should I think, does anyone have any thoughts why it wouldn't be working now?

Coding for the tabs:

 a!localVariables(
              local!selectedTab: 1,
              {
                a!buttonArrayLayout(
                  buttons: {
                    a!buttonWidget(
                      label: "Tasks",
                      saveInto: if(local!selectedTab = 1, {}, a!save(local!selectedTab, 1)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 1, "PRIMARY", "LINK")
                    ),
                    a!buttonWidget(
                      label: "Documents",
                      saveInto: if(local!selectedTab = 2, {}, a!save(local!selectedTab, 2)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 2, "PRIMARY", "LINK")
                    ),
                    a!buttonWidget(
                      label: "Litigation Costs",
                      saveInto: if(local!selectedTab = 3, {}, a!save(local!selectedTab, 3)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 3, "PRIMARY", "LINK")
                    ),
                    a!buttonWidget(
                      label: "Settlement Offers",
                      saveInto: if(local!selectedTab = 4, {}, a!save(local!selectedTab, 4)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 4, "PRIMARY", "LINK")
                    ),
                    a!buttonWidget(
                      label: "Notes",
                      saveInto: if(local!selectedTab = 5, {}, a!save(local!selectedTab = 5)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 5, "PRIMARY", "LINK")
                    ),
                    a!buttonWidget(
                      label: "Case Participants",
                      saveInto: if(local!selectedTab = 6, {}, a!save(local!selectedTab, 6)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 6, "PRIMARY", "LINK")
                    ),
                    a!buttonWidget(
                      label: "Associated Cases",
                      saveInto: if(local!selectedTab = 7, {}, a!save(local!selectedTab, 7)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 7, "PRIMARY", "LINK")
                    ),
                    a!buttonWidget(
                      label: "Notifications",
                      saveInto: if(local!selectedTab = 8, {}, a!save(local!selectedTab, 8)),
                      size: "SMALL",
                      width: "MINIMIZE",
                      style: if(local!selectedTab = 8, "PRIMARY", "LINK")
                    )
                  }
                ),

    Best answer by mikes0011

    6 replies

    mikes0011
    mikes0011Answer
    Brainy
    July 18, 2023

    The Expression Guru
    mikes0011
    Brainy
    July 19, 2023

    [mention:f5e81b8502fa4e77ad12697686a4fc56:e9ed411860ed4f2ba0265705b8793d05] - ?

    The Expression Guru
    mathieud0001
    Brainy
    July 19, 2023

    Accidental (probably done when browsing from my phone) - Fixed and my apologies :)

    stefanhelzle0001
    Brainy
    July 19, 2023

    Mike already posted the solution. But I wanted to make you aware that "{}" is not the same as NULL or 0 (zero). Make sure to use those in a consistent way as debugging these kinds of error is a huge pain.