MudTable: Add option to display paginator at the top#10862
Conversation
tested it with unit test
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #10862 +/- ##
=======================================
Coverage 91.89% 91.89%
=======================================
Files 427 427
Lines 13581 13581
Branches 2603 2603
=======================================
Hits 12480 12480
Misses 526 526
Partials 575 575 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
I believe the test that failed isn't related to the component I wanted to add to the project. When I ran the tests before pushing my branch, all succeeded but one which I had nothing to do with. Am I incorrect? Or is there something I can do to make my component pass the test? |
|
Yes, as you can see below, all checks are now passing successfully. |
Great, thanks! Does this mean the functionality has been imparted to the main branch of the project? |
| // print the generated html | ||
| // select elements needed for the test | ||
| var tablePager = comp.FindComponent<MudTable<int>>().Instance; | ||
| tablePager.PagerAtTop.Should().Be(true); |
There was a problem hiding this comment.
This tests whether or not the parameter was set to True. It does test if the pager actually renders at the top or not.
|
Made requested changes. Thank you for your feedback! This project has been a very valuable learning experience. |
|
|
This issue would be great to solve. Right now using two pagercontents is not an option for a mudtable/muddatagrid. And using a toolbarcontent for the pager above the table works, but doesnt have the same css as a pagercontent. The PagerContent gets styles: The ToolbarContent gets styles: |
|
Hey @mpartsch01, great work on this issue. I see the PR has been open for quite some time now and just needs some finishing touches. I'd like to help get it merged, but since it has developed conflicts with the main branch I will create a new branch based on dev and incorporate your changes with some slight adjustments. I will open a superseding PR and make sure to credit your initial work! |







Hello!
My name is Michaela Sallese, I am currently a 2nd year student at South Hills School of Business & Technology studying software development and computer programming. I had a school project to find an open source project and fix a bug or add functionality to it. After searching GitHub, I found MudBlazor and found the issue someone suggested of having the option to the table's paginator at the top instead of only allowing for it to be at the bottom of the table. I saw before that a user submitted a pull request on this issue that was ultimately rejected, but I would like to appeal that rejection and submit my own code for consideration to be added to the project. The section of the code I added would be for the developer to include in their table <pager-at-top="true"> for the pager to display at the top, or else it will default to being displayed at the bottom. I initiated the proper unit testing the ensure my component would function, and it passed!
I ask of you to implore the addition of this functionality to the MudBlazor project. Not only for the sake of my school project, but to give other MudBlazor users the option to put their paginator where they like. In my time at South Hills, I've learned that coding and designing is about endless possibilities. Why would we want to deny any future developers any choice for how their application looks? Coding and innovation is reliant on creativity, and even if the maintainers of MudBlazor do not believe this functionality to be the most relevant, it was still relevant enough for one user to ask to be included and several others to voice their support of it.
Thank you for your consideration. Please reach out to me if you have any more questions.
Michaela Sallese
Description
How Has This Been Tested?
Type of Changes
Checklist
dev).