Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storybook: Tab loses selected state on window resize in React Reports page example #706

Open
daneah opened this issue Mar 8, 2024 · 0 comments

Comments

@daneah
Copy link
Member

daneah commented Mar 8, 2024

Expected behavior

Tabs should maintain their selected state regardless of window resizing

Actual behavior

Tab loses selected state when resizing the window enough to trigger the sidenav reactivity

Steps to reproduce the issue

  1. Visit https://pharos.jstor.org/storybooks/react/?path=/story/pages-reports--reports
  2. Observe the Report history tab is selected
  3. Using either the Storybook chrome or the full browser window, narrow the window until the sidenav collapses
  4. Observe the Report history tab has lost its selected state

Screenshots or code

Screenshot 2024-03-08 at 16 08 32

Pharos version
14.0.0

Additional information

This may be some confluence of Sidenav reactivity logic, Tab selection logic, ResizeObserver behavior, and React hooks behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant