This is an issue that’s cropped up since dash-core-components 0.27.2 (i.e. the fix which removed the non-callback Tabs defaulting to tab 2 behaviour, amongst other things), and remains in 0.28.0. To explain what I mean, a screenshot and brief summary:
(please excuse the lazily blacked out sensitive details)
In this simple dashboard there are five charts (two within the tabs at top-right), the two left hand charts acting as ‘feeders’ for the others. Specifically:
- The Team Summary chart is defined entirely within the app layout, and has a click action output which determines how to filter which team’s data to show in the Income, Arrears Actions and Top 20 Accounts in Arrears charts.
- The Top 20 Accounts In Arrears chart is generated based on the Team Summary chart, and has a click action which selects which account to feature in the Account Details & 12 Months of Balances chart and summary data.
With previous versions of dash-core-components this dashboard behaved as expected (bar the tabs defaulting to tab 2, Arrears Actions, rather than tab 1). Since the update, however, while the tabs now default to the expected tab 1, they misbehave whenever the cursor passes over either of the two charts with callback outputs: specifically, whenever the Team Summary or Top 20 Accounts in Arrears charts generate a hover action, the tabs jump back to their default view of tab 1.
Potentially relevant notes:
- This behaviour only manifests if the tabs are generated in non-callback form.
- The tabs do not reset to default on a hover action of the 12 Months of Balances chart (despite it having a hover label active), hence my assumption that this is triggered specifically by charts with a callback output
- The output of the Top 20 Accounts in Arrears callback does not have any effect on either of the charts held within the tabs, suggesting that a relationship between the charts is not a factor.
- The charts which cause the reset to default do not have a callback output associated with their hover action, only with a click action, so although it seems that having a callback output is a necessary factor, the nature of said output doesn’t seem to be relevant
Obviously there are workarounds available here (either using callback tabs, or reverting to an earlier version of dash-core-components), but I thought it worth flagging up!