-
Notifications
You must be signed in to change notification settings - Fork 428
[dev-v5] Add DataGrid - part 2, get base code working #3915
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-v5
Are you sure you want to change the base?
Conversation
- Add doc start - Add Paginator / PaginationState
…/dev-v5/datagrid-part2
- Remove ::deep - Change county codes to align with v4
…com/microsoft/fluentui-blazor into users/vnbaaij/dev-v5/datagrid-part1
- Remove ::deep - Change county codes to align with v4 - Merge part 1 - Fix analyzer errors and warnings - Rename parameters
With this coming in, I'm so eager to try and migrate to v5 <3 |
✅ All tests passed successfully Details on your Workflow / Core Tests page. |
…ij/dev-v5/datagrid-part2
…ij/dev-v5/datagrid-part2
…com/microsoft/fluentui-blazor into users/vnbaaij/dev-v5/datagrid-part2
- Fix error with flags - Fix css colors - Add tests
- Fix ToDo items - Misc code changes
Summary - Unit Tests Code CoverageSummary
CoverageMicrosoft.FluentUI.AspNetCore.Components - 98.7%
|
- Add more tests
...ples/Demo/FluentUI.Demo.Client/Documentation/GetStarted/Migration/MigrationFluentDataGrid.md
Outdated
Show resolved
Hide resolved
- Add and use DataGridCellAlignment enum - Use overriden DisposeAsync - Use correct comment format
- Use local variables in testing cell/row
…com/microsoft/fluentui-blazor into users/vnbaaij/dev-v5/datagrid-part2
@@ -1,4 +1,5 @@ | |||
|
|||
# *************************** |
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 remove this double ***
line ?
{ | ||
private bool _isFirstRender = true; | ||
|
||
[CascadingParameter] internal InternalGridContext<TGridItem> InternalGridContext { get; set; } = default!; |
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 move the [CascadingParameter]
above the internal ...
/// <summary> | ||
/// For internal use only. Do not use. | ||
/// </summary> | ||
[Parameter] public RenderFragment? ChildContent { get; set; } |
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 move the [Parameter]
above the public ...
/// <summary> | ||
/// Provides methods for asynchronous evaluation of queries against an <see cref="IQueryable{T}" />. | ||
/// </summary> | ||
public interface IAsyncQueryExecutor |
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 change the public
to internal
?
/// <summary> | ||
/// A column that can bind to a property of model | ||
/// </summary> | ||
public interface IBindableColumn |
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 change the public
to internal
?
.Build(); | ||
|
||
/// <inheritdoc /> | ||
public void Dispose() => Owner.Unregister(this); |
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 override the FluentComponentBase.DisposeAsync
method?
private bool _checkColumnOptionsPosition; | ||
private bool _checkColumnResizePosition; | ||
private bool _manualGrid; | ||
//private IJSObjectReference? Module; |
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 remove this commented line?
// Import the JavaScript module | ||
await JSModule.ImportJavaScriptModuleAsync(JAVASCRIPT_FILE); | ||
|
||
_jsEventDisposable = await JSModule.ObjectReference.InvokeAsync<IJSObjectReference>("init", _gridReference, AutoFocus); |
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.
If you don't need ObjectReference, you don't need to keep it in a variable. The Base class will take responsibility for disposing of it.
So you can remove the declaration of _jsEventDisposable
} | ||
} | ||
|
||
SaveStateToQueryString(); |
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.
Why all of the rest of the method is not in the firstRender
test? Each rendering will call all of these JS function. Correct?
await Pagination.SetItemsPerPageAsync(visibleRows - 1); // subtract 1 for the table header | ||
} | ||
|
||
//public void SetPageReference(Type page) |
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 remove this commented code ?
No description provided.