You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a use case, where the tabs of a tab sheet can change their visibility based on outer circumstances. However, the tabsheet does not care properly about hidden tabs. There are multiple scenarios, where the tabsheet behaves incorrect:
hiding all tabs
When the tabs are hidden initially (all set to visible false) the tabsheet stays "empty", showing only the separator and the tab content loading spinner.
All tabs are hidden, only the spinner is shown
hiding all tabs / the current selected tab during use time
Hiding all tabs after a certain tab has been selected leads to a similar behavior as 1) with the difference that the content of the current tab is still shown. Same when only the currently selected tab is hidden.
Tab 2 has been hidden, its content is till shown. No other tab gets auto selected
Expected outcome
When the last visible tab is hidden, the whole tabsheet should be made invisible. When at least one tab is made visible again, the tabsheet itself should automatically update its own visibility. To not messup the server state, this "hidden due to hidden children" should be set on the client only, e.g. with the "hidden" attribute.
When the current selected tab is hidden, but others are still visible, the tabsheet should autoselect another tab. Since there might be different expectations of which tab should be autoselected, the tabsheet could provide one of the following:
either some "autoselect strategy" (e.g. "first tab", "last tab", "previous tab", "following tab"), on which depending the new selected tab is choosen
or the dev can provide a function. that function receives the hidden tab index and returns the tab index to be selected (or alternatively the tab objects themselves, but getting the tab from the index is easier then vice versa?)
Minimal reproducible example
This sample hides the tabs initially. The "switch" button shows/hides tab 2. Modify the initial setVisibles to also reproduce the other scenario.
Description
We have a use case, where the tabs of a tab sheet can change their visibility based on outer circumstances. However, the tabsheet does not care properly about hidden tabs. There are multiple scenarios, where the tabsheet behaves incorrect:
When the tabs are hidden initially (all set to visible false) the tabsheet stays "empty", showing only the separator and the tab content loading spinner.
All tabs are hidden, only the spinner is shown

Hiding all tabs after a certain tab has been selected leads to a similar behavior as 1) with the difference that the content of the current tab is still shown. Same when only the currently selected tab is hidden.
Tab 2 has been hidden, its content is till shown. No other tab gets auto selected

Expected outcome
When the last visible tab is hidden, the whole tabsheet should be made invisible. When at least one tab is made visible again, the tabsheet itself should automatically update its own visibility. To not messup the server state, this "hidden due to hidden children" should be set on the client only, e.g. with the "hidden" attribute.
When the current selected tab is hidden, but others are still visible, the tabsheet should autoselect another tab. Since there might be different expectations of which tab should be autoselected, the tabsheet could provide one of the following:
Minimal reproducible example
This sample hides the tabs initially. The "switch" button shows/hides tab 2. Modify the initial setVisibles to also reproduce the other scenario.
Steps to reproduce
Environment
Vaadin version(s): 24.6.4
Browsers
No response
The text was updated successfully, but these errors were encountered: