-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
feat(tabs): add lazy loading for tabpanel content #17388
base: master
Are you sure you want to change the base?
feat(tabs): add lazy loading for tabpanel content #17388
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Skipped Deployments
|
Someone is attempting to deploy a commit to the primetek Team on Vercel. A member of the Team first needs to authorize it. |
2f838fc
to
9c852ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
9c852ff
to
706c99c
Compare
706c99c
to
96e1111
Compare
Hi @Adrii77, thanks a lot for your PR! I think we can add
WDYT? |
Hi @mertsincan , Thank you for your answer and for your time :) My opinion :
With this PR, lazy loading is preserved and prevents this regression (working with my test, hope you'll test too !). I think in any case it would be wise and pragmatic to have lazy loading this way to prevent this feature regression and why not refactor later if you want to find a way to do it via inputs. What do you think ? :) |
Defect Fixes
#16806
#17351
This PR add lazy loading for the desired tabpanel's projected content.
Inactive tabs are hidden
([hidden]="!active())"
.initialized
signal is used to render content the first time the tab is active and prevent re-initalization on reselection. Maybe alinkedSignal
could be used, but I write the code the be compatible with NG 18.It could be really cool if this PR could be merged and available in a patch version on 18, since apps that migrate to Prime 18 end up with complex components instantiated inside inactive tabs... (this is my case)