I have a page with three tabs: X, Y, and Z. By default, the page loads with the X tab selected, and I have implemented a custom state to track the selected tab when the user clicks on a different tab.
When I open the page in debug mode, the custom state updates correctly, and the content changes when clicking on Tab Y. However, in normal mode, clicking on Tab Y does not update the content immediately. It only works after I refresh the page and then click on the tabs.
Expected Behavior:
- Clicking on any tab (X, Y, or Z) should update the custom state and display the corresponding content immediately.
- The page should work the same in normal mode as it does in debug mode.
Observed Behavior:
- In debug mode, the custom state updates properly, and the content changes when clicking on tabs.
- In normal mode, clicking on Tab Y does not update the content immediately. It only works after refreshing the page.
Troubleshooting Steps Taken:
- Checked debug mode, where the custom state updates correctly.
- Verified that the workflow for setting the custom state runs when clicking on a tab.
- Tried refreshing the page, which makes it work correctly afterward.
Question:
What could be causing the custom state to not update properly in normal mode, and how can I fix this issue so that tab selection works as expected without requiring a page refresh?
Would appreciate any insights or troubleshooting suggestions. Thanks!