-
Notifications
You must be signed in to change notification settings - Fork 130
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
Implement TabSheet lazy tabs #3029
Comments
Tested on Java:
The button 'tab2Button' always equals null - Ok |
ilushaaa
added a commit
that referenced
this issue
Jun 13, 2024
ilushaaa
added a commit
that referenced
this issue
Jun 15, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Similar to Classic https://docs.jmix.io/1.x/jmix/1.5/ui/vcl/containers/tab-sheet.html#lazy-loading-tab-content
The TabSheet component switches tabs and each tab can have many components. To descrease loading time of a view we can set attribute
lazy=true
to some tabs. In that case the vew won't load components from lazy tabs. Those components will load automatically if user activates a tab.Descriptor example:
Controller example:
In this example we have two tabs: tab1 and tab2. Tab2 is marked as lazy. Thus when the view is opened only components from tab1 are loaded.
The view is opened: tab1Button is loaded and tab2Button is empty.
The tab2 is activated: tab1Button is loaded and tab2Button is loaded.
We should be carefull about injecting components from lazy tabs in a controller because they wouldn't be initialised.
In this example, tab1Button is initialised and tab2Button is equals null. Even after the lazy tab activation tab2Button won't be initialised. We should handle this case manually.
The text was updated successfully, but these errors were encountered: