-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Tabview : dynamic header is not updated #9483
Comments
I ran into the same issue and since I'm using dynamic translations my TabPanels show completely empty. Also seems to be related to #9475 |
Hi @Brutus5000, <p-tabView>
<p-tabPanel [header]="'my.path' | translate">
<!-- content -->
</p-tabPanel>
</p-tabview> by : <p-tabView>
<p-tabPanel>
<ng-template pTemplate="header">
{{ 'my.path' | translate }}
</ng-template>
<!-- content -->
</p-tabPanel>
</p-tabview> |
@JordanSagnes Thank you very much. Works flawless. ❤️ |
Can confirm this is still an issue. Similar environment to JordanSagnes, but I just updated to v11.0.0-rc.1 and use typescript. My issue is somewhat similar to Brutus5000 in that I am trying to translate the header. I am using a directive that calls a service to retrieve the translation from the server and then update the tabPanel.header. The header remains blank in the browser until selected then updates to show the value received from the server. I tried the pipe + template approach JordanSagnes recommended, but with that the header remains empty. |
Can confirm this behavior with ngx-translate. The fix using the template seems to be working. |
Unable to replicate with PrimeNG 11.3.1, if the issue persists please create a new ticket with a test case reproducing the issue e.g. stackblitz or a github repo and it will be reviewed by our team once again. You can check at https://stackblitz.com/edit/github-7jjko1-du5ymt |
You save my day, thanks a lot !!! |
[x] bug report => Search github for a similar issue or PR before submitting
Plunkr Case (Bug Reports)
Please demonstrate your case at stackblitz by using the issue template below. Issues without a test case have much less possibility to be reviewd in detail and assisted.
code : https://stackblitz.com/edit/github-7jjko1?file=src/app/app.component.html
application : https://github-7jjko1.stackblitz.io
Current behavior
For a tabview component, the header is not updated after a change (like increment a counter)
Expected behavior
After increment a counter, my tabview header is automatically updated
Minimal reproduction of the problem with instructions
Please tell us about your environment:
Ubuntu or windows
On intellij or VScode
angular 10 with primeng 10.0.3
Chrome
Angular version:
Angular 10
PrimeNG version:
Primeng 10.0.3
Browser: all
Language: ES6/7
The text was updated successfully, but these errors were encountered: