-
Notifications
You must be signed in to change notification settings - Fork 460
[DataGrid] Make SelectColumn respond to programmatic changes in grid data #3949
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 60.5%
|
dvoituron
approved these changes
Jun 24, 2025
Collaborator
dvoituron
left a comment
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.
Strange. Why were these unit tests modified when the code hasn't changed?
Collaborator
Author
|
I'll double check that |
- Call base OnInitialized in SelectColumn
dvoituron
approved these changes
Jun 25, 2025
vnbaaij
added a commit
that referenced
this pull request
Jul 1, 2025
vnbaaij
added a commit
that referenced
this pull request
Jul 3, 2025
* - Add enums - Add doc start - Add Paginator / PaginationState * - Add DataGrid component * Add DataGridGeneratedHeaderType * Fix analyzer errors * - Add Typical demo and flags - Remove ::deep - Change county codes to align with v4 * Work on review comments * Process review comments * Add language resources * Add Unit Tests for Paginator * More review comments * Update tests. Now 100% lc * Replace tokens (WIP) * Remove flags. These will be added to sample data project in separate PR * Remove DI abstractions package. Not needed * Add IsFixed parameter * MAke example grid mor functional and look better * Add initial tests. They are not passing yet * Add surpression atribute, fix other analyzer warnings * Use localized strings * Fix tests * Add Tests * Add tests for PaginatinState and TotalItemCountChangedEventArgs * Add Row tests * process review comments * More tests * More tests * - Add typical demo - Fix error with flags - Fix css colors - Add tests * More tests * - More tests - Fix ToDo items - Misc code changes * Update file headers * Bring in changes made in v4 with #3949 * - Update file headers - Add more tests * Process review comments: - Add and use DataGridCellAlignment enum - Use overriden DisposeAsync - Use correct comment format * Forgot to change the docs * - Use auto-generated constant - Use local variables in testing cell/row * Process review comments * More review comments * - Undo make internal GridItemsProvider* - Implement SelectColumn localization - Fix CSS issue with select column * Update test verified files --------- Co-authored-by: Denis Voituron <[email protected]>
This was referenced Jul 22, 2025
vnbaaij
added a commit
that referenced
this pull request
Jul 22, 2025
* - Add enums - Add doc start - Add Paginator / PaginationState * - Add DataGrid component * Add DataGridGeneratedHeaderType * Fix analyzer errors * - Add Typical demo and flags - Remove ::deep - Change county codes to align with v4 * Work on review comments * Process review comments * Add language resources * Add Unit Tests for Paginator * More review comments * Update tests. Now 100% lc * Replace tokens (WIP) * Remove flags. These will be added to sample data project in separate PR * Remove DI abstractions package. Not needed * Add IsFixed parameter * MAke example grid mor functional and look better * Add initial tests. They are not passing yet * Add surpression atribute, fix other analyzer warnings * Use localized strings * Fix tests * Add Tests * Add tests for PaginatinState and TotalItemCountChangedEventArgs * Add Row tests * process review comments * More tests * More tests * - Add typical demo - Fix error with flags - Fix css colors - Add tests * More tests * - More tests - Fix ToDo items - Misc code changes * Update file headers * Convert DataGrid JS to TS * Implement fix for #3963 * Bring in changes made in v4 with #3949 * - Update file headers - Add more tests * Process review comments: - Add and use DataGridCellAlignment enum - Use overriden DisposeAsync - Use correct comment format * Forgot to change the docs * - Use auto-generated constant - Use local variables in testing cell/row * DataGrid docs and examples * Process review comments * More review comments * - Undo make internal GridItemsProvider* - Implement SelectColumn localization - Fix CSS issue with select column * Update test verified files * - Fix when to show header menu - Make all examples work - Create example pages * - Rename getting started - Remove double section - Use primary color on paginator buttos (and apply better style when button is diabled) * WIP * Update samples and structure * Make all DataGrid samples work * Update DataGrid verified tests files --------- Co-authored-by: Denis Voituron <[email protected]>
This was referenced Jul 29, 2025
Closed
This was referenced Oct 13, 2025
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make the
SelectColumncomponent in theFluentDataGridrespond to programmatic changes in the grid data.This pull request introduces enhancements to the
DataGridcomponent, focusing on improving the handling of selected items and introducing event-driven updates. The most significant changes include implementing an event-based mechanism for tracking item changes, and ensuring proper disposal of resources.Enhancements to
SelectColumnclass:IDisposableimplementation: TheSelectColumn<TGridItem>class now implementsIDisposableto ensure proper cleanup of resources, specifically theEventCallbackSubscriberfor item change events. (src/Core/Components/DataGrid/Columns/SelectColumn.cs, [1] [2]EventCallbackSubscriber(_itemsChanged) in theSelectColumn<TGridItem>class to listen for item change events and update selected items accordingly. This ensures the selected items remain consistent with the current state of the grid. (src/Core/Components/DataGrid/Columns/SelectColumn.cs, [1] [2]Updates to
InternalGridContext:ItemsChangedevent: Introduced theItemsChangedevent in theInternalGridContext<TGridItem>class to allow subscribers to react to changes in the grid's items. (src/Core/Components/DataGrid/Infrastructure/InternalGridContext.cs, src/Core/Components/DataGrid/Infrastructure/InternalGridContext.csR28)Integration with
FluentDataGrid:ItemsChangedevent: Modified theRefreshDataCoreAsyncmethod inFluentDataGrid.razor.csto invoke callbacks for theItemsChangedevent whenever the grid's items are refreshed. (src/Core/Components/DataGrid/FluentDataGrid.razor.cs, src/Core/Components/DataGrid/FluentDataGrid.razor.csR792-R793)