This repository has been archived by the owner on Mar 27, 2023. It is now read-only.
datagrid with pagination disappears within tab-content #6163
Unanswered
symeonmattes
asked this question in
Q&A
Replies: 2 comments 4 replies
-
This can be accomplished by using the de-sugared syntax of the <clr-tab>
<button type="button" clrTabLink>Tab2</button>
<ng-template [(clrIfActive)]="showDatagrid">
<clr-tab-content>
Content Tab2
<clr-datagrid>
<clr-dg-column>User ID</clr-dg-column>
<clr-dg-column>First Name</clr-dg-column>
<clr-dg-column>Last Name</clr-dg-column>
<clr-dg-column>Email</clr-dg-column>
<clr-dg-row *clrDgItems="let user of users">
<clr-dg-cell>{{user.id}}</clr-dg-cell>
<clr-dg-cell>{{user.first_name}}</clr-dg-cell>
<clr-dg-cell>{{user.last_name}}</clr-dg-cell>
<clr-dg-cell>{{user.email}}</clr-dg-cell>
</clr-dg-row>
<clr-dg-footer>
{{users.length}} users
<clr-dg-pagination></clr-dg-pagination>
</clr-dg-footer>
</clr-datagrid>
</clr-tab-content>
</ng-template>
</clr-tab> Here is an example. I am going to convert this into a discussion, it isn't an issue with Clarity and it may be helpful to others with the same question. |
Beta Was this translation helpful? Give feedback.
2 replies
-
I have already tried it with clrActive but it doesn't keep pagination. If I go to page 3 and change tab and return back it starts from page 1 again |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I'm using clr-tabs, clr-tab, clr-datagrid, clr-dg-pagination to create a datagird inside a clr-tab. When the clr-datagrid is not the active tab on load, on activation doesn't not render.
However if it's on first tab it works fine
How to reproduce
Not working Tab2 datagrid Not working datagrid. Just press Tab2->Tab1->Tab2 again
Working Tab2 datagrid as active tab Working Datagrid. Just press Tab1->Tab2 again (You might need to refresh the page)
Expected behavior
On Tab change datagrid and pagination should work as expected
Versions
Clarity project:
Clarity version:
Framework:
Framework version:
ie: Angular 12
Device:
Beta Was this translation helpful? Give feedback.
All reactions