-
-
Notifications
You must be signed in to change notification settings - Fork 529
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
Doesn't work highlighting of the active page in the DataGrid #669
Comments
This same problem with standard Pagination/PagintaionItem/PaginationLink buttons. Just checked everything and problem is still this same. |
@if (paginationShow) {
<Pagination>
<PaginationItem IsDisabled="@(searchPageNr <= 1)">
<PaginationLink Page="prev" Clicked="@OnPaginationItemClick">
@MyText.previous
</PaginationLink>
</PaginationItem>
@for ( int i = 1; i <= lastPage; ++i ) {
var pageName = i.ToString();
var isSamePage = (i==searchPageNr);
var bacgroundColor = isSamePage ? Color.Primary : Color.None;
<PaginationItem IsDisabled="@isSamePage" IsActive="@isSamePage" Background="@bacgroundColor" >
<PaginationLink Page="@pageName" Clicked="@OnPaginationItemClick">
@pageName @isSamePage
</PaginationLink>
</PaginationItem>
}
<PaginationItem IsDisabled="@(searchPageNr >= lastPage)">
<PaginationLink Page="next" Clicked="@OnPaginationItemClick">
@MyText.next
</PaginationLink>
</PaginationItem>
</Pagination>
} |
Hi sorry for not responding sooner. There are missing some image from first post so I'm not sure what is the real problem. Can you give me more information or better, can you create a simple demo project that I can test? tnx |
@stsrki i've made an example - https://github.com/8VAid8/BlazoriseDataGridDemo |
I have tested your example and I can confirm it's not working as expected. Then I copied an example to Blazorise demo and tried it. It's working as expected. Really strange behavior. All I can think of is that the problem can be this part: @for ( int i = FirstVisiblePage; i <= LastVisiblePage; ++i )
{
var pageName = i.ToString();
<PaginationItem Disabled="@(i == CurrentPage)" Active="@(i == CurrentPage)">
<PaginationLink Page="@pageName" Clicked="@OnPaginationItemClick">
@pageName
</PaginationLink>
</PaginationItem>
} An I will try to change it but since I cannot reproduce it within Blazorise I will leave this ticket open until you confirm the bug is gone. Is that OK? |
Hi @8VAid8 Blazorise v0.9 is out. Can you confirm this issues is gone? PS. In case you need to upgrade: https://blazorise.com/news/release-notes/090/ |
Hi, @stsrki! Thank you for a new release! But, unfortunately I can't confirm the issue is gone. May be threre is something wrong with my code. I'll try to check it out. |
Hi. |
@AjaxSantos Thank you! I didn't realized it is the Bulma provider. I can now confirm the bug on my side. |
I'm seeing this same issue. The DataGrid pages correctly, the buttons work to change the page, but the highlighting is wrong. All the links, including the 'active' one, have the 'disabled' class as well which seems to be the issue. |
I'm facing the same issue as @Eastiling with Blazorise Bootstrap. |
This isn't a proper fix by any stretch, but a liveable workaround for now:
Add the above to an active stylesheet, feel free to mess with it. I went for the simplest fix. |
@Eastiling Thank you very much for sharing 👍 |
Describe the bug
There is a page 2 is supposed to be selected. DataGrid shows rows from a page 2, but doesn't select pagination item.
The proper variant have to looks like here:
My code:
The text was updated successfully, but these errors were encountered: