-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
MudDataGrid: Custom Child Row Rendering #11594
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
base: dev
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #11594 +/- ##
=======================================
Coverage 91.21% 91.21%
=======================================
Files 466 466
Lines 14699 14699
Branches 2855 2854 -1
=======================================
Hits 13407 13407
Misses 646 646
Partials 646 646 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Want to be transparent that it might take a while to get an answer on moving it forwards |
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.
Pull Request Overview
A new ChildRowRenderer parameter has been added to MudDataGrid to allow full control over child row rendering. The virtualized row component has been updated to invoke this renderer, and documentation/examples have been added to demonstrate the feature.
- Introduce
ChildRowRendererparameter inMudDataGrid.razor.cs. - Update
DataGridVirtualizeRow.razorto render either the custom renderer or the legacy content. - Add a new example and documentation section for row detail rendering.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/MudBlazor/Components/DataGrid/MudDataGrid.razor.cs | Added ChildRowRenderer parameter with XML docs |
| src/MudBlazor/Components/DataGrid/DataGridVirtualizeRow.razor | Extended rendering logic to call ChildRowRenderer |
| src/MudBlazor.Docs/Pages/Components/DataGrid/Examples/DataGridDetailRowRendererExample.razor | New example showcasing ChildRowRenderer usage |
| src/MudBlazor.Docs/Pages/Components/DataGrid/DataGridPage.razor | Added documentation section for row detail renderer feature |
Comments suppressed due to low confidence (2)
src/MudBlazor.Docs/Pages/Components/DataGrid/DataGridPage.razor:237
- The
Codeparameter referencesDataGridDetailRowExample, but the example component is namedDataGridDetailRowRendererExample. Update it toCode="@nameof(DataGridDetailRowRendererExample)"to ensure the correct code is displayed.
<SectionContent DarkenBackground="true" Code="@nameof(DataGridDetailRowExample)" ShowCode="false" Block="true" FullWidth="true">
src/MudBlazor/Components/DataGrid/MudDataGrid.razor.cs:882
- The new
ChildRowRendererparameter lacks unit or integration tests to verify correct rendering behavior. Consider adding tests to cover scenarios where a custom renderer is provided.
public RenderFragment<CellContext<T>> ChildRowRenderer
src/MudBlazor.Docs/Pages/Components/DataGrid/Examples/DataGridDetailRowRendererExample.razor
Show resolved
Hide resolved
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.
This has been requested a bunch of times. This will fit in nicely. Make the changes and let's get this submitted up.
src/MudBlazor.Docs/Pages/Components/DataGrid/DataGridPage.razor
Outdated
Show resolved
Hide resolved
Co-authored-by: Versile Johnson II <148913404+versile2@users.noreply.github.com>
Co-authored-by: Versile Johnson II <148913404+versile2@users.noreply.github.com>
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.
Can you post a screenshot of the Doc section you added in the initial PR request?





I would like to have an option to control the childrow placeholder (so not just 1 td with colspan="1000")
I've had 2 situations where I needed this:
Checklist
dev).Please let me know if you would want to incorporate this proposal, then I'll add the relevant tests and/or fix your comments